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 f156192
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"build:cjs": "tsc --module commonjs --outDir ./lib/cjs",
"build:types": "tsc --declaration --emitDeclarationOnly --outFile ./lib/index.d.ts",
"build": "npm run clean && npm run build:esm && npm run build:cjs && npm run build:types",
"xss": "ts-node scripts/get-latest-sanctions.ts && ts-node scripts/export-sanctions.ts"
"update_ofac_list": "ts-node scripts/get-latest-sanctions.ts && ts-node scripts/export-sanctions.ts"
},
"author": "",
"license": "ISC",
Expand Down

0 comments on commit f156192

Please sign in to comment.