Skip to content

Commit 861e392

Browse files
ci(model-fit): manage package update workflow
1 parent 7c9cbd2 commit 861e392

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

‎.github/workflows/skill-updates.yml‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,25 @@ jobs:
2323
persist-credentials: false
2424

2525
- uses: actions/setup-node@v7
26-
if: hashFiles('.github/packaging/skill/update.py') != ''
2726
with:
2827
node-version: '24'
29-
registry-url: https://npm.pkg.github.com
30-
scope: '@atls'
3128

32-
- name: Install the released policy
33-
if: hashFiles('.github/packaging/skill/update.py') != ''
29+
- name: Update declared skill packages
30+
working-directory: .github/packaging/skills
3431
env:
35-
NODE_AUTH_TOKEN: ${{ github.token }}
36-
MODEL_FIT_TAG: ${{ github.event.client_payload.tag }}
37-
run: python3 .github/packaging/skill/update.py "$MODEL_FIT_TAG"
32+
SKILLS_NPM_TOKEN: ${{ github.token }}
33+
run: corepack yarn up -R '@atls/skill-*' --mode=update-lockfile
34+
35+
- name: Install the locked skill package
36+
working-directory: .github/packaging/skills
37+
env:
38+
SKILLS_NPM_TOKEN: ${{ github.token }}
39+
run: corepack yarn install --immutable
40+
41+
- name: Copy the policy into the plugin
42+
run: cp .github/packaging/skills/node_modules/@atls/skill-model-fit/references/assessment-policy.md skills/model-fit/references/assessment-policy.md
3843

3944
- uses: actions/create-github-app-token@v3.2.0
40-
if: hashFiles('.github/packaging/skill/update.py') != ''
4145
id: app-token
4246
with:
4347
client-id: ${{ vars.ATLANTIS_SUPER_BOT_CLIENT_ID }}
@@ -47,15 +51,13 @@ jobs:
4751
permission-pull-requests: write
4852

4953
- uses: peter-evans/create-pull-request@v8
50-
if: hashFiles('.github/packaging/skill/update.py') != ''
5154
id: pull-request
5255
with:
5356
token: ${{ steps.app-token.outputs.token }}
5457
branch: automation/model-fit-package
5558
base: master
5659
add-paths: |
57-
.github/packaging/skill/package.json
58-
.github/packaging/skill/package-lock.json
60+
.github/packaging/skills/yarn.lock
5961
skills/model-fit/references/assessment-policy.md
6062
commit-message: 'fix(model-fit): update the assessment policy'
6163
title: 'fix(model-fit): update the assessment policy'

0 commit comments

Comments
 (0)