Skip to content

Commit

Permalink
ci: trigger push build action after tag creation
Browse files Browse the repository at this point in the history
earlier push build action was not triggered due
to github action limitation.
```
An action in a workflow run can’t trigger a new workflow run.
```

so now, we'll use user personal toke to create tag so that push
build action pick the user not github action who created the tag.

Closes: #8580
Signed-off-by: subhamkrai <srai@redhat.com>
  • Loading branch information
subhamkrai committed Oct 12, 2021
1 parent b3567f3 commit c53304c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/push-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ on:
branches:
- master
- release-*
tags:
- v*
workflow_run:
workflows: ["Tag"]
types: [completed]

defaults:
run:
Expand All @@ -15,7 +16,12 @@ defaults:
jobs:
push-image-to-container-registry:
runs-on: ubuntu-18.04
if: github.repository == 'rook/rook'
# github.repository == 'rook/rook': for running the test only in 'rook/rook' repo
# github.event_name == 'push': This is for any push to master or release branches
# github.event.workflow_run.conclusion == 'success': For the tagged workflow completion
if: |
github.repository == 'rook/rook' &&
(github.event_name == 'push' || github.event.workflow_run.conclusion == 'success')
steps:
- name: checkout
uses: actions/checkout@v2
Expand Down

0 comments on commit c53304c

Please sign in to comment.