From 39eeae71c2fdae305f729df40de566973bf37f2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Thu, 13 Feb 2025 13:02:29 +0100 Subject: [PATCH 1/5] chore: update @intersect.mbo package workflow path adjustment --- .github/workflows/update-intersect-package.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update-intersect-package.yml b/.github/workflows/update-intersect-package.yml index 0050807c5..9a7a06c65 100644 --- a/.github/workflows/update-intersect-package.yml +++ b/.github/workflows/update-intersect-package.yml @@ -28,11 +28,12 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} - - name: Setup Node.js + - name: Set up Node.js uses: actions/setup-node@v4 with: + registry-url: "https://registry.npmjs.org/" node-version-file: "./govtool/frontend/.nvmrc" - cache: "npm" + scope: "@intersect.mbo" - name: Update package version in frontend run: | @@ -48,7 +49,7 @@ jobs: - name: Install dependencies in frontend run: | - cd govtool/govtool/frontend + cd govtool/frontend npm install - name: Commit and push changes @@ -57,7 +58,7 @@ jobs: git checkout -b $BRANCH_NAME git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git add govtool/govtool/frontend/package.json govtool/govtool/frontend/package-lock.json + git add govtool/frontend/package.json govtool/frontend/package-lock.json git commit -m "chore: update ${{ github.event.inputs.package_name }} to ${{ github.event.inputs.new_version }}" git push origin $BRANCH_NAME From ef2e2892cc600d81a252b9df4542fa3d2c63cf4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Thu, 13 Feb 2025 13:16:59 +0100 Subject: [PATCH 2/5] chore: add actor to PR description --- .github/workflows/update-intersect-package.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-intersect-package.yml b/.github/workflows/update-intersect-package.yml index 9a7a06c65..8adbebe43 100644 --- a/.github/workflows/update-intersect-package.yml +++ b/.github/workflows/update-intersect-package.yml @@ -68,6 +68,8 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} branch: ${{ github.event.inputs.package_name }}-${{ github.event.inputs.new_version }} title: "Update ${{ github.event.inputs.package_name }} to ${{ github.event.inputs.new_version }}" - body: "This PR updates ${{ github.event.inputs.package_name }} to version ${{ github.event.inputs.new_version }}." + body: | + "This PR updates `${{ github.event.inputs.package_name }}` to version `${{ github.event.inputs.new_version }}`. + Workflow executed by ${{ github.actor }}." labels: "dependencies" sign-commits: true From e5aa99cb3921dfd291e81c91592333bc31e5f9a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Thu, 13 Feb 2025 13:20:50 +0100 Subject: [PATCH 3/5] chore: branch name update --- .github/workflows/update-intersect-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-intersect-package.yml b/.github/workflows/update-intersect-package.yml index 8adbebe43..bb0efbf9d 100644 --- a/.github/workflows/update-intersect-package.yml +++ b/.github/workflows/update-intersect-package.yml @@ -54,7 +54,7 @@ jobs: - name: Commit and push changes run: | - BRANCH_NAME="update-${{ github.event.inputs.package_name }}-${{ github.event.inputs.new_version }}" + BRANCH_NAME="chore/${{ github.event.inputs.package_name }}-${{ github.event.inputs.new_version }}" git checkout -b $BRANCH_NAME git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" @@ -66,7 +66,7 @@ jobs: uses: peter-evans/create-pull-request@v7 with: token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ github.event.inputs.package_name }}-${{ github.event.inputs.new_version }} + branch: "chore/${{ github.event.inputs.package_name }}-${{ github.event.inputs.new_version }}" title: "Update ${{ github.event.inputs.package_name }} to ${{ github.event.inputs.new_version }}" body: | "This PR updates `${{ github.event.inputs.package_name }}` to version `${{ github.event.inputs.new_version }}`. From bffe7ed7913bd5e250b7939de0283a235a6c0187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Thu, 13 Feb 2025 13:24:10 +0100 Subject: [PATCH 4/5] chore: remove unnecessary step --- .github/workflows/update-intersect-package.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/update-intersect-package.yml b/.github/workflows/update-intersect-package.yml index bb0efbf9d..9c8695115 100644 --- a/.github/workflows/update-intersect-package.yml +++ b/.github/workflows/update-intersect-package.yml @@ -52,16 +52,6 @@ jobs: cd govtool/frontend npm install - - name: Commit and push changes - run: | - BRANCH_NAME="chore/${{ github.event.inputs.package_name }}-${{ github.event.inputs.new_version }}" - git checkout -b $BRANCH_NAME - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add govtool/frontend/package.json govtool/frontend/package-lock.json - git commit -m "chore: update ${{ github.event.inputs.package_name }} to ${{ github.event.inputs.new_version }}" - git push origin $BRANCH_NAME - - name: Create Pull Request uses: peter-evans/create-pull-request@v7 with: From 26d50b4ca08b88ac9332b2a56818d868a9e34f75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Thu, 13 Feb 2025 13:27:17 +0100 Subject: [PATCH 5/5] chore: PR description changes --- .github/workflows/update-intersect-package.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-intersect-package.yml b/.github/workflows/update-intersect-package.yml index 9c8695115..e2fb1d680 100644 --- a/.github/workflows/update-intersect-package.yml +++ b/.github/workflows/update-intersect-package.yml @@ -59,7 +59,9 @@ jobs: branch: "chore/${{ github.event.inputs.package_name }}-${{ github.event.inputs.new_version }}" title: "Update ${{ github.event.inputs.package_name }} to ${{ github.event.inputs.new_version }}" body: | - "This PR updates `${{ github.event.inputs.package_name }}` to version `${{ github.event.inputs.new_version }}`. - Workflow executed by ${{ github.actor }}." + This PR updates `${{ github.event.inputs.package_name }}` to version `${{ github.event.inputs.new_version }}`. + + + Workflow executed by `@${{ github.actor }}`. labels: "dependencies" sign-commits: true