Skip to content

build: push container image after successful PR merge #10

build: push container image after successful PR merge

build: push container image after successful PR merge #10

Workflow file for this run

name: Build container image
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
TAG_NAME: ${{ github.event_name == 'push' && github.ref_name || format('pr-{0}', github.event.pull_request.number) }}
jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Buildah Action
uses: redhat-actions/buildah-build@v2
with:
image: infinitewarp/quips
tags: ${{ github.sha }} ${{ TAG_NAME }}

Check failure on line 21 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Build container image

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 21, Col: 15): Unrecognized named-value: 'TAG_NAME'. Located at position 1 within expression: TAG_NAME
containerfiles: ./compose/django/Dockerfile
- name: push container image
# Enable this to push *only* after the merge
# if: github.event.pull_request.merged == true
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ${{ secrets.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}