From c2f69b2699743b9ae53ac8cd0772b86cc6c2cf63 Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Thu, 19 Oct 2023 18:13:04 +0200 Subject: [PATCH] fix: calling a workflow from another doesn't work this way --- .github/workflows/cron.yml | 14 ++++++++------ .github/workflows/publish.yml | 4 +++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index c91737b..f8d13f8 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -7,9 +7,10 @@ on: - cron: "0 9 * * *" jobs: - update-ofac-list: + update_ofac_list: runs-on: ubuntu-latest - + outputs: + output1: ${{ steps.step1.outputs.test }} permissions: contents: write @@ -22,7 +23,7 @@ jobs: - run: npm install - name: Check if new addresses were added via the OFAC xss feed - run: npm run update-ofac-list + run: npm run update_ofac_list - name: Sets a flag if the list was changed id: diff_flag @@ -34,6 +35,7 @@ jobs: with: commit_message: "auto: Add new OFAC addresses" - - name: "Run if changes have been detected" - if: ${{ steps.bump_version.diff_flag.GIT_EXIT_CODE == 1 }} - uses: celo-org/compliance/.github/worklows/publish.yml@main + publish-npm-package: + needs: update_ofac_list + if: ${{ needs.update_ofac_list.outputs.GIT_EXIT_CODE == 1 }} + uses: celo-org/compliance/.github/workflows/publish.yml@main diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0363503..e06e4d0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,8 +1,10 @@ name: Publish Package to npmjs + on: workflow_call: + jobs: - build: + publish: runs-on: ubuntu-latest permissions: