Add a note about reporting to the feedback blurb. #40
This file contains hidden or 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: Push image to Container Registry | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'service/**' | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Check out the repository | |
| - uses: actions/checkout@v3 | |
| # Set up QEMU for multi-platform builds (required for non-native architectures) | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2 | |
| # Set up Docker Buildx for advanced multi-platform builds | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| # Log in to GitHub Container Registry using the provided GITHUB_TOKEN | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set short git commit SHA | |
| id: vars | |
| run: | | |
| calculatedSha=$(git rev-parse --short ${{ github.sha }}) | |
| echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV | |
| - name: Confirm git commit SHA output | |
| run: echo ${{ env.COMMIT_SHORT_SHA }} | |
| # Build and push the Docker image for both amd64 and arm64 architectures | |
| # The image is tagged as "latest" and with the short commit SHA. | |
| # It also includes a label pointing to the associated repository. | |
| - name: Build and Push Docker Image | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: . | |
| file: Dockerfile-service | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: | | |
| ghcr.io/${{ github.repository }}:latest | |
| ghcr.io/${{ github.repository }}:g${{ env.COMMIT_SHORT_SHA }} | |
| labels: | | |
| org.opencontainers.image.source=https://github.com/${{ github.repository }} | |
| org.opencontainers.image.licenses=Apache-2.0 |