|
7 | 7 | jobs: |
8 | 8 | update-nodejs-inventory: |
9 | 9 | name: Update Node.js Engine Inventory |
10 | | - runs-on: pub-hk-ubuntu-22.04-small |
| 10 | + runs-on: pub-hk-ubuntu-24.04-ip |
11 | 11 | steps: |
12 | 12 | - name: Checkout Repo |
13 | 13 | uses: actions/checkout@v4 |
14 | | - - name: Install Rust Toolchain |
15 | | - uses: actions-rs/toolchain@v1 |
16 | | - with: |
17 | | - toolchain: stable |
| 14 | + - name: Update Rust toolchain |
| 15 | + run: rustup update |
18 | 16 | - name: Install Rust Inventory Binaries |
19 | | - run: cargo install heroku-nodejs-utils --bin diff_versions --bin generate_inventory --git https://github.com/heroku/buildpacks-nodejs |
20 | | - - id: set-diff-msg |
21 | | - name: Set Diff Message |
| 17 | + run: cargo install heroku-nodejs-utils --bin update_node_inventory --git https://github.com/heroku/buildpacks-nodejs |
| 18 | + - name: Rebuild Inventory |
| 19 | + id: rebuild-inventory |
22 | 20 | run: | |
23 | 21 | delimiter="$(openssl rand -hex 8)" |
24 | 22 | { |
25 | 23 | echo "msg<<${delimiter}" |
26 | | - diff_versions node inventory/node.toml |
| 24 | + update_node_inventory ./inventory/node.toml ./CHANGELOG.md --platform linux-x64 --format classic |
27 | 25 | echo "${delimiter}" |
28 | 26 | } >> $GITHUB_OUTPUT |
29 | | - - name: Rebuild Inventory |
30 | | - run: "generate_inventory node > inventory/node.toml" |
31 | | - - name: Update Changelog |
32 | | - run: echo "${{ steps.set-diff-msg.outputs.msg }}" | xargs -r -I '{}' perl -i -p -e 's/## main\s+/## main\n\n{}/' CHANGELOG.md |
33 | | - - uses: heroku/use-app-token-action@main |
| 27 | + - uses: actions/create-github-app-token@v2 |
34 | 28 | id: generate-token |
35 | 29 | with: |
36 | | - app_id: ${{ vars.LINGUIST_GH_APP_ID }} |
37 | | - private_key: ${{ secrets.LINGUIST_GH_PRIVATE_KEY }} |
| 30 | + app-id: ${{ vars.LINGUIST_GH_APP_ID }} |
| 31 | + private-key: ${{ secrets.LINGUIST_GH_PRIVATE_KEY }} |
38 | 32 | - name: Create Pull Request |
39 | 33 | id: pr |
40 | | - uses: peter-evans/create-pull-request@v5.0.2 |
| 34 | + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 |
41 | 35 | with: |
42 | | - token: ${{ steps.generate-token.outputs.app_token }} |
| 36 | + token: ${{ steps.generate-token.outputs.token }} |
43 | 37 | title: "Update Node.js Engine Inventory" |
44 | | - commit-message: "Update Inventory for heroku/nodejs engine\n\n${{ steps.set-diff-msg.outputs.msg }}" |
| 38 | + commit-message: "Update Inventory for heroku/nodejs-engine\n\n${{ steps.rebuild-inventory.outputs.msg }}" |
45 | 39 | branch: update-nodejs-inventory |
46 | | - body: "Automated pull-request to update heroku/nodejs engine inventory:\n\n${{ steps.set-diff-msg.outputs.msg }}" |
47 | | - committer: ${{ vars.LINGUIST_GH_APP_USERNAME }} <${{ vars.LINGUIST_GH_APP_EMAIL }}> |
48 | | - author: ${{ vars.LINGUIST_GH_APP_USERNAME }} <${{ vars.LINGUIST_GH_APP_EMAIL }}> |
49 | | - - name: Configure PR |
50 | | - if: steps.pr.outputs.pull-request-operation == 'created' |
51 | | - run: gh pr merge --squash --auto "${{ steps.pr.outputs.pull-request-number }}" |
52 | | - env: |
53 | | - GH_TOKEN: ${{ steps.generate-token.outputs.app_token }} |
54 | | - |
55 | | - update-yarn-inventory: |
56 | | - name: Update Node.js Yarn Inventory |
57 | | - runs-on: pub-hk-ubuntu-22.04-small |
58 | | - steps: |
59 | | - - name: Checkout Repo |
60 | | - uses: actions/checkout@v4 |
61 | | - - id: install-rust-toolchain |
62 | | - name: Install Rust Toolchain |
63 | | - uses: actions-rs/toolchain@v1 |
64 | | - with: |
65 | | - toolchain: stable |
66 | | - - name: Install Rust Inventory Binaries |
67 | | - run: cargo install heroku-nodejs-utils --bin diff_versions --bin generate_inventory --git https://github.com/heroku/buildpacks-nodejs |
68 | | - - id: set-diff-msg |
69 | | - name: Set Diff Message |
70 | | - run: | |
71 | | - delimiter="$(openssl rand -hex 8)" |
72 | | - { |
73 | | - echo "msg<<${delimiter}" |
74 | | - diff_versions yarn inventory/yarn.toml |
75 | | - echo "${delimiter}" |
76 | | - } >> $GITHUB_OUTPUT |
77 | | - - name: Rebuild Inventory |
78 | | - run: "generate_inventory yarn > inventory/yarn.toml" |
79 | | - - name: Update Changelog |
80 | | - run: echo "${{ steps.set-diff-msg.outputs.msg }}" | xargs -r -I '{}' perl -i -p -e 's/## main\s+/## main\n\n{}/' CHANGELOG.md |
81 | | - - uses: heroku/use-app-token-action@main |
82 | | - id: generate-token |
83 | | - with: |
84 | | - app_id: ${{ vars.LINGUIST_GH_APP_ID }} |
85 | | - private_key: ${{ secrets.LINGUIST_GH_PRIVATE_KEY }} |
86 | | - - name: Create Pull Request |
87 | | - id: pr |
88 | | - uses: peter-evans/create-pull-request@v5.0.2 |
89 | | - with: |
90 | | - token: ${{ steps.generate-token.outputs.app_token }} |
91 | | - title: "Update Node.js Yarn Inventory" |
92 | | - commit-message: "Update Inventory for heroku/nodejs yarn\n\n${{ steps.set-diff-msg.outputs.msg }}" |
93 | | - branch: update-yarn-inventory |
94 | | - body: "Automated pull-request to update heroku/nodejs yarn inventory:\n\n${{ steps.set-diff-msg.outputs.msg }}" |
| 40 | + body: "Automated pull-request to update heroku/nodejs-engine inventory:\n\n${{ steps.rebuild-inventory.outputs.msg }}" |
95 | 41 | committer: ${{ vars.LINGUIST_GH_APP_USERNAME }} <${{ vars.LINGUIST_GH_APP_EMAIL }}> |
96 | 42 | author: ${{ vars.LINGUIST_GH_APP_USERNAME }} <${{ vars.LINGUIST_GH_APP_EMAIL }}> |
97 | 43 | - name: Configure PR |
98 | 44 | if: steps.pr.outputs.pull-request-operation == 'created' |
99 | 45 | run: gh pr merge --squash --auto "${{ steps.pr.outputs.pull-request-number }}" |
100 | 46 | env: |
101 | | - GH_TOKEN: ${{ steps.generate-token.outputs.app_token }} |
| 47 | + GH_TOKEN: ${{ steps.generate-token.outputs.token }} |
0 commit comments