This repository was archived by the owner on Apr 8, 2026. It is now read-only.
Merge pull request #263 from sgibson91/sgibson91-patch-1 #240
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: Build Image | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| pull_request: | |
| branches: | |
| - "main" | |
| concurrency: image-build | |
| jobs: | |
| build-image: | |
| runs-on: ubuntu-latest | |
| environment: image_build | |
| steps: | |
| - name: Parse image tag | |
| id: parse_image_tag | |
| shell: python | |
| run: | | |
| tag = "${{ github.ref_name }}".replace("/", "-") | |
| print(f"::set-output name=image_tag::{tag}") | |
| - name: Echo tag | |
| run: | | |
| echo "${{ steps.parse_image_tag.outputs.image_tag }}" | |
| - name: Login to Quay.io | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: quay.io | |
| username: ${{ secrets.QUAY_USERNAME }} | |
| password: ${{ secrets.QUAY_PASSWORD }} | |
| - name: Build image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: quay.io/${{ github.repository }}:${{ steps.parse_image_tag.outputs.image_tag }} |