Skip to content

Commit

Permalink
restore update-israeli-scrapers pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
baruchiro committed Sep 18, 2024
1 parent 01106b4 commit 2123ba1
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
57 changes: 57 additions & 0 deletions .github/workflows/update-israeli-bank-scrapers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Update israeli-bank-scrapers

on:
schedule:
- cron: '0 0 * * *'
# Manual trigger
workflow_dispatch:

jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version

- name: Get old version
id: get_old_version
run: |
old_version=$(yarn list --pattern israeli-bank-scrapers-core --depth=0 --json --non-interactive --no-progress | jq -r '.data.trees[].name' | cut -d'@' -f2)
echo "old_version=${old_version}" >> $GITHUB_OUTPUT
- name: Install dependencies
run: yarn install

- name: Upgrade israeli-bank-scrapers-core
run: |
yarn upgrade israeli-bank-scrapers-core --latest
- name: Get new version
id: get_new_version
run: |
new_version=$(yarn list --pattern israeli-bank-scrapers-core --depth=0 --json --non-interactive --no-progress | jq -r '.data.trees[].name' | cut -d'@' -f2)
echo "new_version=${new_version}" >> $GITHUB_OUTPUT
- name: Generate diff link
id: diff_link
run: |
echo "diff_link=https://github.com/eshaham/israeli-bank-scrapers/compare/v${{ steps.get_old_version.outputs.old_version }}...v${{ steps.get_new_version.outputs.new_version }}" >> $GITHUB_OUTPUT
- name: Create pull request
uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6.0.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: 'deps/israeli-bank-scrapers-core'
base: 'master'
delete-branch: true # Delete the branch after the pull request is closed
commit-message: 'Deps: Upgrade israeli-bank-scrapers to ${{ steps.get_new_version.outputs.new_version }}'
title: 'Deps: Upgrade israeli-bank-scrapers to ${{ steps.get_new_version.outputs.new_version }}'
body: |
Upgrade israeli-bank-scrapers-core library to ${{ steps.get_new_version.outputs.new_version }}
Changes:
- [Diff Link](${{ steps.diff_link.outputs.diff_link }})
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "caspion",
"description": "Caspion is a personal finance management application",
"version": "2.0.0-test.3",
"version": "2.0.0",
"private": true,
"type": "module",
"author": "Jonathan Goldfarb <brafdlog@gmail.com>",
Expand Down

0 comments on commit 2123ba1

Please sign in to comment.