name: Build Docker Image on: push: branches: - main paths-ignore: - README.md workflow_dispatch: permissions: contents: read packages: write env: GHCR_REPO: ghcr.io/aurora-develop/aurora jobs: docker: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Read version id: version shell: bash run: | version="$(tr -d '[:space:]' < VERSION)" echo "version=${version}" >> "${GITHUB_OUTPUT}" echo "tag=v${version}" >> "${GITHUB_OUTPUT}" echo "sha_short=${GITHUB_SHA::12}" >> "${GITHUB_OUTPUT}" - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GHCR_PAT }} - name: Build and push to GHCR uses: docker/build-push-action@v6 with: context: . file: Dockerfile platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/s390x push: true provenance: false tags: | ${{ env.GHCR_REPO }}:latest ${{ env.GHCR_REPO }}:${{ steps.version.outputs.version }} ${{ env.GHCR_REPO }}:${{ steps.version.outputs.tag }} ${{ env.GHCR_REPO }}:${{ steps.version.outputs.sha_short }} cache-from: type=gha,scope=${{ github.ref_name }} cache-to: type=gha,mode=max,scope=${{ github.ref_name }}