Skip to content

Commit

Permalink
Fix issue: in the called workflow, the github.event_name is that of t…
Browse files Browse the repository at this point in the history
…he caller so it will never be workflow_call so we need to change to push
  • Loading branch information
light-tech committed Oct 19, 2022
1 parent f63c57a commit 378fa04
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ jobs:
- run: echo "Manually Called"
if: ${{ github.event_name == 'workflow_dispatch' }}

- run: echo "Called from another workflow"
if: ${{ github.event_name == 'workflow_call' }}
# See https://github.com/actions/runner/issues/1548 for the fact that when called from
# another workflow, the github.event_name is the trigger for THAT caller workflow and
# not set to workflow_call!
- run: echo "Called from release workflow"
if: ${{ github.event_name == 'push' }}

- uses: actions/checkout@v3

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/moveit2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Fetch prebuilt ROS2 base and Rviz2 from previous job artifacts
uses: actions/download-artifact@v3
if: ${{ github.event_name == 'workflow_call' }}
if: ${{ github.event_name == 'push' }}

- name: Extract artifacts
run: ./extract_artifacts.sh
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Build everything for release
on:
workflow_dispatch:
push:
tags:
- '**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rviz2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Fetch prebuilt ROS2 base from previous job artifacts
uses: actions/download-artifact@v3
if: ${{ github.event_name == 'workflow_call' }}
if: ${{ github.event_name == 'push' }}

- name: Extract artifacts
run: ./extract_artifacts.sh
Expand Down

0 comments on commit 378fa04

Please sign in to comment.