Skip to content

Merge pull request #232 from sgibson91/dependabot-github_actions-acti… #175

Merge pull request #232 from sgibson91/dependabot-github_actions-acti…

Merge pull request #232 from sgibson91/dependabot-github_actions-acti… #175

Workflow file for this run

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@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build image
uses: docker/build-push-action@v6
with:
push: ${{ github.event_name != 'pull_request' }}
tags: quay.io/${{ github.repository }}:${{ steps.parse_image_tag.outputs.image_tag }}