chore: Bump actions/checkout from 3 to 4 (#40) #54
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create images | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
packages: write | |
env: | |
REGISTRY: ghcr.io | |
# Common versions | |
GO_VERSION: '1.19' | |
SERVER_IMG_TAG : '0.1.0' | |
EXPORTER_IMG_TAG: '0.1.0' | |
jobs: | |
export-registry: | |
runs-on: ubuntu-20.04 | |
outputs: | |
registry: ${{ steps.export.outputs.registry }} | |
steps: | |
- id: export | |
run: | | |
# registry must be in lowercase | |
echo "registry=$(echo "${{ env.REGISTRY }}/${{ github.repository }}" | tr [:upper:] [:lower:])" >> $GITHUB_OUTPUT | |
publish-images: | |
runs-on: ubuntu-20.04 | |
needs: | |
- export-registry | |
env: | |
REGISTRY: ${{ needs.export-registry.outputs.registry }} | |
steps: | |
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Login to ${{ env.REGISTRY }} | |
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push images | |
run: | | |
OUTPUT_TYPE=type=registry make docker-build-server-image docker-build-exporter-image | |
env: | |
SERVER_IMG_TAG: ${{ env.SERVER_IMG_TAG }} | |
EXPORTER_IMG_TAG: ${{ env.EXPORTER_IMG_TAG }} |