-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (33 loc) · 968 Bytes
/
cron.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Update OFAC list
on:
workflow_dispatch:
schedule:
# Daily at 9AM
- cron: "0 9 * * *"
jobs:
update-ofac-list:
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.step1.outputs.test }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20.x"
- run: npm install
- name: Check if new addresses were added via the OFAC xss feed
run: npm run update-ofac-list
- name: Sets a flag if the list was changed
id: diff_flag
run: |
git diff --exit-code ofac.sanctions.json
echo "GIT_EXIT_CODE=$?" >> $GITHUB_OUTPUT
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "auto: Add new OFAC addresses"
publish-npm-package:
needs: update-ofac-list
if: ${{ steps.diff_flag.outputs.GIT_EXIT_CODE == 1 }}
uses: publish.yml