Skip to content

Commit b9502f1

Browse files
authored
Merge pull request #2974 from IntersectMBO/feat/2968-automate-pillar-package-updates-via-workflow
chore(#2968): workflow adjustments
2 parents 16be6c9 + 26d50b4 commit b9502f1

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

.github/workflows/update-intersect-package.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ jobs:
2828
with:
2929
token: ${{ secrets.GITHUB_TOKEN }}
3030

31-
- name: Setup Node.js
31+
- name: Set up Node.js
3232
uses: actions/setup-node@v4
3333
with:
34+
registry-url: "https://registry.npmjs.org/"
3435
node-version-file: "./govtool/frontend/.nvmrc"
35-
cache: "npm"
36+
scope: "@intersect.mbo"
3637

3738
- name: Update package version in frontend
3839
run: |
@@ -48,25 +49,19 @@ jobs:
4849
4950
- name: Install dependencies in frontend
5051
run: |
51-
cd govtool/govtool/frontend
52+
cd govtool/frontend
5253
npm install
5354
54-
- name: Commit and push changes
55-
run: |
56-
BRANCH_NAME="update-${{ github.event.inputs.package_name }}-${{ github.event.inputs.new_version }}"
57-
git checkout -b $BRANCH_NAME
58-
git config user.name "github-actions[bot]"
59-
git config user.email "github-actions[bot]@users.noreply.github.com"
60-
git add govtool/govtool/frontend/package.json govtool/govtool/frontend/package-lock.json
61-
git commit -m "chore: update ${{ github.event.inputs.package_name }} to ${{ github.event.inputs.new_version }}"
62-
git push origin $BRANCH_NAME
63-
6455
- name: Create Pull Request
6556
uses: peter-evans/create-pull-request@v7
6657
with:
6758
token: ${{ secrets.GITHUB_TOKEN }}
68-
branch: ${{ github.event.inputs.package_name }}-${{ github.event.inputs.new_version }}
59+
branch: "chore/${{ github.event.inputs.package_name }}-${{ github.event.inputs.new_version }}"
6960
title: "Update ${{ github.event.inputs.package_name }} to ${{ github.event.inputs.new_version }}"
70-
body: "This PR updates ${{ github.event.inputs.package_name }} to version ${{ github.event.inputs.new_version }}."
61+
body: |
62+
This PR updates `${{ github.event.inputs.package_name }}` to version `${{ github.event.inputs.new_version }}`.
63+
64+
65+
Workflow executed by `@${{ github.actor }}`.
7166
labels: "dependencies"
7267
sign-commits: true

0 commit comments

Comments
 (0)