-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created new job that uses a label from a forked PR to build an image …
…for the Quay.io Kuadrant Operator Registry Signed-off-by: dlaw4608 <[email protected]>
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: PR Conditional Build and Push Image to Quay.io Repo | ||
|
||
on: | ||
pull_request_target: | ||
types: [labeled, opened, synchronize, reopened] | ||
|
||
concurrency: | ||
group: pr-conditional-build-${{ github.event.pull_request.number }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
workflow-build: | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'forked_image_approved') }} | ||
name: Calls build-images-base workflow | ||
uses: ./.github/workflows/build-images-base.yaml | ||
secrets: inherit | ||
with: | ||
kuadrantOperatorVersion: ${{ github.event.pull_request.user.login }}-${{ github.event.pull_request.number }} | ||
kuadrantOperatorTag: ${{ github.event.pull_request.user.login }}-${{ github.event.pull_request.number }} | ||
|
||
remove-label: | ||
runs-on: ubuntu-latest | ||
needs: workflow-build | ||
steps: | ||
- name: Remove forked_image_approved label after workflow is triggered | ||
- uses: actions-ecosystem/action-remove-labels@v1 | ||
with: | ||
labels: forked_image_approved | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |