From 324d3711686ddf030973d4bc7e6abf8c36d63bff Mon Sep 17 00:00:00 2001 From: Arnaud de Surirey Date: Thu, 27 Mar 2025 18:13:38 +0100 Subject: [PATCH 1/5] chore: automate data updates --- .github/workflows/update-iso.yml | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/update-iso.yml diff --git a/.github/workflows/update-iso.yml b/.github/workflows/update-iso.yml new file mode 100644 index 0000000..c2e2a1f --- /dev/null +++ b/.github/workflows/update-iso.yml @@ -0,0 +1,40 @@ +name: Update ISO 4217 Data + +on: + schedule: + - cron: "0 0 * * 1" # Runs every Monday at midnight UTC + workflow_dispatch: # Allows manual triggering of the workflow + +jobs: + update-iso: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + + - name: Install dependencies + run: bun install + + - name: Run ISO script + run: bun run iso + + - name: Commit changes + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add . + git commit -m "Update ISO 4217 data" || echo "No changes to commit" + + - name: Push changes and create PR + uses: peter-evans/create-pull-request@v5 + with: + branch: update-iso-4217-data + title: "Update ISO 4217 Data" + body: "This PR updates the ISO 4217 data by running the `iso` script." + commit-message: "chore: update ISO 4217 data" From 2653ac23404b8ab564369216bb113e64da92bf59 Mon Sep 17 00:00:00 2001 From: Arnaud de Surirey Date: Thu, 27 Mar 2025 18:30:11 +0100 Subject: [PATCH 2/5] ci(update-iso): upgrade peter-evans/create-pull-request to v7 --- .github/workflows/update-iso.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-iso.yml b/.github/workflows/update-iso.yml index c2e2a1f..f710f83 100644 --- a/.github/workflows/update-iso.yml +++ b/.github/workflows/update-iso.yml @@ -32,9 +32,12 @@ jobs: git commit -m "Update ISO 4217 data" || echo "No changes to commit" - name: Push changes and create PR - uses: peter-evans/create-pull-request@v5 + uses: peter-evans/create-pull-request@v7 with: branch: update-iso-4217-data title: "Update ISO 4217 Data" - body: "This PR updates the ISO 4217 data by running the `iso` script." + body: | + This PR updates the ISO 4217 data by running the `iso` script. + + Please review and merge this PR if everything looks good. commit-message: "chore: update ISO 4217 data" From b33d7294d4a573235c00587cb16575c68b1a28c2 Mon Sep 17 00:00:00 2001 From: Arnaud de Surirey Date: Thu, 27 Mar 2025 18:37:09 +0100 Subject: [PATCH 3/5] ci(update-iso): ignore bun.lockb --- .github/workflows/update-iso.yml | 13 +++---------- .gitignore | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/update-iso.yml b/.github/workflows/update-iso.yml index f710f83..3c1f548 100644 --- a/.github/workflows/update-iso.yml +++ b/.github/workflows/update-iso.yml @@ -24,20 +24,13 @@ jobs: - name: Run ISO script run: bun run iso - - name: Commit changes - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add . - git commit -m "Update ISO 4217 data" || echo "No changes to commit" - - - name: Push changes and create PR + - name: Commit changes and create PR uses: peter-evans/create-pull-request@v7 with: branch: update-iso-4217-data - title: "Update ISO 4217 Data" + commit-message: "chore: update ISO 4217 data" + title: Update ISO 4217 Data body: | This PR updates the ISO 4217 data by running the `iso` script. Please review and merge this PR if everything looks good. - commit-message: "chore: update ISO 4217 data" diff --git a/.gitignore b/.gitignore index 099ae14..a4a1948 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ node_modules package-lock.json - +bun.lockb From 7ce6e80772510ce243ead7024a931d7a6c6b617b Mon Sep 17 00:00:00 2001 From: Arnaud de Surirey Date: Thu, 27 Mar 2025 18:41:23 +0100 Subject: [PATCH 4/5] chore: ignore bun.lock --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a4a1948..911fcb5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules package-lock.json bun.lockb +bun.lock From 0a4c5a18a94446250208104a06d7312062f2dfb1 Mon Sep 17 00:00:00 2001 From: Arnaud de Surirey Date: Fri, 28 Mar 2025 10:13:30 +0100 Subject: [PATCH 5/5] ci(update-iso): add tests update check in PR description --- .github/workflows/update-iso.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-iso.yml b/.github/workflows/update-iso.yml index 3c1f548..d21d609 100644 --- a/.github/workflows/update-iso.yml +++ b/.github/workflows/update-iso.yml @@ -33,4 +33,7 @@ jobs: body: | This PR updates the ISO 4217 data by running the `iso` script. - Please review and merge this PR if everything looks good. + Please review and merge it if everything looks good. + + **Todo:** + - [ ] Update tests