Skip to content

Commit

Permalink
fix: calling a workflow from another doesn't work this way
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasbrugneaux committed Oct 19, 2023
1 parent d20ffef commit c2f69b2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
4 changes: 3 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Publish Package to npmjs

on:
workflow_call:

jobs:
build:
publish:
runs-on: ubuntu-latest

permissions:
Expand Down

0 comments on commit c2f69b2

Please sign in to comment.