Skip to content

Build Script Image on PR #2

Build Script Image on PR

Build Script Image on PR #2

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