Skip to content

πŸ’š (automation): Automate the update of our toolchain #1

πŸ’š (automation): Automate the update of our toolchain

πŸ’š (automation): Automate the update of our toolchain #1

name: Update toolchain
on:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
push:
branches:
- chore/no-issue-auto-update-toolchain
jobs:
update-toolchain:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: LedgerHQ/device-sdk-ts/.github/actions/setup-toolchain-composite@develop
- name: Setup git and branch
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git checkout -b chore/update-toolchain
- name: Update toolchain
run: /
proto outdated --update
- name: Check for changes
id: changes
run: |
echo "status=$(git status --porcelain | wc -l)" >> $GITHUB_OUTPUT
- name: Create PR
if: steps.changes.outputs.status > 0
run: |
git add .prototools
git commit -m "πŸ”§ (repo) [NO-ISSUE]: Update toolchain"
git push origin chore/update-toolchain
gh pr create \
--title "πŸ”§ (repo) [NO-ISSUE]: Update toolchain" \
--body "This PR updates the toolchain (node, npm, pnpm) to the newest versions" \
--base develop \
--head chore/update-toolchain \
--reviewer @ledgerhq/live-devices
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}