From 378fa04887132ee678f2235f017155bf13f63ae9 Mon Sep 17 00:00:00 2001 From: Lightech Date: Wed, 19 Oct 2022 09:07:35 -0400 Subject: [PATCH] Fix issue: in the called workflow, the github.event_name is that of the caller so it will never be workflow_call so we need to change to push --- .github/workflows/base.yaml | 7 +++++-- .github/workflows/moveit2.yaml | 2 +- .github/workflows/release.yaml | 1 - .github/workflows/rviz2.yaml | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/base.yaml b/.github/workflows/base.yaml index 70e58be..15a9ba6 100644 --- a/.github/workflows/base.yaml +++ b/.github/workflows/base.yaml @@ -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 diff --git a/.github/workflows/moveit2.yaml b/.github/workflows/moveit2.yaml index 443b355..86b9cb2 100644 --- a/.github/workflows/moveit2.yaml +++ b/.github/workflows/moveit2.yaml @@ -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 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d7f0106..d9bd153 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,6 +1,5 @@ name: Build everything for release on: - workflow_dispatch: push: tags: - '**' diff --git a/.github/workflows/rviz2.yaml b/.github/workflows/rviz2.yaml index ea76d89..a8b1439 100644 --- a/.github/workflows/rviz2.yaml +++ b/.github/workflows/rviz2.yaml @@ -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