Build Script Image on PR #2
This file contains 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 Script Image on PR | |
on: | |
workflow_run: | |
workflows: ["Check Author"] | |
types: | |
- completed | |
env: | |
REGISTRY: quay.io/redhat-appstudio | |
IMAGE_NAME: update-infra-deployments-task-script-image | |
jobs: | |
build-on-pr: | |
runs-on: ubuntu-latest | |
if: > | |
github.event.workflow_run.event == 'pull_request' && | |
github.event.workflow_run.conclusion == 'success' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Log in to Red Hat Registry | |
uses: redhat-actions/podman-login@v1 | |
with: | |
registry: registry.redhat.io | |
username: ${{ secrets.REGISTRY_REDHAT_IO_USER }} | |
password: ${{ secrets.REGISTRY_REDHAT_IO_PASSWORD }} | |
- name: Build Image | |
id: build-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: ${{ env.IMAGE_NAME }} | |
tags: ${{ github.sha }} | |
context: . | |
containerfiles: | | |
./update-infra-deployments-task-scripts-image/Dockerfile |