Skip to content

Commit 208de6b

Browse files
author
Dmytro Bondar
authored
Upgrade action to use node20 (#121)
* Action update: - Bump all dependencies - Rewrite `getLatestHelmVersion()` function without graphql * Bump stableHelmVersion * Update readme and action.yaml * Revert and rewrite with @octokit/action * Add latest to integration test * Bump action's versions * Set github.token as default input * Replace deprecated jest methods * Add prettier to dev dependencies, fix prettier issues
1 parent 1f87a57 commit 208de6b

File tree

10 files changed

+1623
-9030
lines changed

10 files changed

+1623
-9030
lines changed

.github/workflows/defaultLabels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
# Steps represent a sequence of tasks that will be executed as part of the job
1515
steps:
16-
- uses: actions/stale@v6
16+
- uses: actions/stale@v9
1717
name: Setting issue as idle
1818
with:
1919
repo-token: ${{ secrets.GITHUB_TOKEN }}
@@ -24,7 +24,7 @@ jobs:
2424
operations-per-run: 100
2525
exempt-issue-labels: 'backlog'
2626

27-
- uses: actions/stale@v6
27+
- uses: actions/stale@v9
2828
name: Setting PR as idle
2929
with:
3030
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/integration-tests.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
PR_BASE_REF: ${{ github.event.pull_request.base.ref }}
1616
steps:
1717
- name: Check out repository
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919
- name: npm install and build
2020
id: action-npm-build
2121
run: |
@@ -63,3 +63,25 @@ jobs:
6363
else
6464
echo "HELM VERSION $HELM_3_5_0 INSTALLED SUCCESSFULLY"
6565
fi
66+
- name: Setup helm latest version
67+
uses: ./
68+
with:
69+
version: latest
70+
token: ${{ secrets.GITHUB_TOKEN }}
71+
- name: Validate latest
72+
env:
73+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
run: |
75+
HELM_LATEST=$(gh release list \
76+
--repo helm/helm \
77+
--exclude-drafts \
78+
--exclude-pre-releases \
79+
--limit 1 | awk '{print $4}')
80+
81+
if [[ $(helm version) != *$HELM_LATEST* ]]; then
82+
echo "HELM VERSION INCORRECT: HELM VERSION DOES NOT CONTAIN $HELM_LATEST"
83+
echo "HELM VERSION OUTPUT: $(helm version)"
84+
exit 1
85+
else
86+
echo "HELM VERSION $HELM_LATEST INSTALLED SUCCESSFULLY"
87+
fi

.github/workflows/prettify-code.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout Repository
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414

1515
- name: Enforce Prettier
16-
uses: actionsx/prettier@v2
16+
uses: actionsx/prettier@v3
1717
with:
1818
args: --check .

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
build: # make sure build/ci works properly
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717

1818
- name: Run L0 tests.
1919
run: |

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ Acceptable values are latest or any semantic version string like v3.5.0 Use this
1414
id: install
1515
```
1616
17-
> Note: When using latest version you might hit the GitHub GraphQL API hourly rate limit of 5,000. The action will then return the hardcoded default stable version (currently v3.11.1). If you rely on a certain version higher than the default, you should use that version instead of latest.
17+
> [!NOTE]
18+
> When using latest version you might hit the GitHub GraphQL API hourly rate limit of 5,000. The action will then return the hardcoded default stable version (currently v3.13.3). If you rely on a certain version higher than the default, you should use that version instead of latest.
1819
1920
The cached helm binary path is prepended to the PATH environment variable as well as stored in the helm-path output variable.
2021
Refer to the action metadata file for details about all the inputs https://github.com/Azure/setup-helm/blob/master/action.yml

action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ inputs:
88
token:
99
description: GitHub token. Required only if 'version' == 'latest'
1010
required: false
11+
default: '${{ github.token }}'
1112
downloadBaseURL:
1213
description: 'Set the download base URL'
1314
required: false
@@ -18,5 +19,5 @@ outputs:
1819
branding:
1920
color: 'blue'
2021
runs:
21-
using: 'node16'
22+
using: 'node20'
2223
main: 'lib/index.js'

0 commit comments

Comments
 (0)