Skip to content

Commit

Permalink
Update sync deps workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
stwiname committed Dec 11, 2024
1 parent 40aea36 commit 9421ebc
Showing 1 changed file with 23 additions and 26 deletions.
49 changes: 23 additions & 26 deletions .github/workflows/sync-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,35 @@ jobs:
name: update deps
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
contents: write
pull-requests: write
env:
SUBQL_ACCESS_TOKEN: ${{ secrets.SUBQL_ACCESS_TOKEN }}
SUBQL_ACCESS_TOKEN_TEST: ${{ secrets.SUBQL_ACCESS_TOKEN_TEST }}
SUBQL_ORG_TEST: ${{ secrets.SUBQL_ORG_TEST }}
steps:
- uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
- run: yarn
- uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
- run: yarn

# Update deps
- name: Update types
run: yarn --cwd ./packages/types add @subql/types-core
- name: Update common
run: yarn --cwd ./packages/common-near add @subql/common
- name: Update node
run: yarn --cwd ./packages/node add @subql/common @subql/node-core

- name: Determine branch name
id: branch-name
run: echo "branch=sync-$(date +'%Y%m%d')" >> $GITHUB_OUTPUT

- uses: peter-evans/create-pull-request@v5
with:
branch: ${{ steps.branch-name.outputs.branch }}
commit-message: "Update @subql deps"
token: ${{ secrets.SQ_SDK_GITHUB_SECRET }}
title: 'Sync @subql dependencies'
body-file: '.github/PULL_REQUEST_TEMPLATE.md'
# Update deps
- name: Update types
run: yarn --cwd ./packages/types add @subql/types-core
- name: Update common
run: yarn --cwd ./packages/common-near add @subql/common
- name: Update node
run: yarn --cwd ./packages/node add @subql/common @subql/node-core

- name: Determine branch name
id: branch-name
run: echo "branch=sync-$(date +'%Y%m%d')" >> $GITHUB_OUTPUT

- uses: peter-evans/create-pull-request@v7
with:
branch: ${{ steps.branch-name.outputs.branch }}
commit-message: "Update @subql deps"
title: "Sync @subql dependencies"
body-path: ".github/PULL_REQUEST_TEMPLATE.md"

0 comments on commit 9421ebc

Please sign in to comment.