Skip to content

Commit a09f3f1

Browse files
authored
Merge pull request #44 from maks-oleksyuk/update-node-version
Update action to node 20 (close #43)
2 parents 195215d + 7ee9a03 commit a09f3f1

File tree

8 files changed

+1533
-1146
lines changed

8 files changed

+1533
-1146
lines changed

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
permissions: write-all
1414
steps:
1515
- name: Setup node
16-
uses: actions/setup-node@v3
16+
uses: actions/setup-node@v4
1717
with:
18-
node-version: 16.x
18+
node-version: 20.x
1919

2020
- name: Checkout repository
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222

2323
- name: Install dependencies
2424
run: npm ci

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16
1+
20

.prettierrc

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"bracketSpacing": true,
3-
"jsxBracketSameLine": false,
43
"printWidth": 80,
54
"semi": true,
65
"singleQuote": true,

README.md

+39-40
Original file line numberDiff line numberDiff line change
@@ -28,46 +28,45 @@ In this case, a [GitHub App](https://docs.github.com/en/developers/apps/getting-
2828
3. Add your GitHub App's "App ID" to your repo's [Actions Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) _(ex: `GH_APP_ID`)_
2929
4. Add your Private Key to your repo's [Actions Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) _(ex: `GH_APP_PRIVATE_KEY`)_
3030
5. Use [navikt/github-app-token-generator](https://github.com/navikt/github-app-token-generator) before using this action to generate a JWT
31-
32-
#### Example
33-
34-
`cleanup-pr.yml`
35-
36-
```
37-
#
38-
# Cleans up a GitHub PR
39-
#
40-
name: 🧼 Clean up environment
41-
on:
42-
pull_request:
43-
types:
44-
- closed
45-
46-
jobs:
47-
cleanup:
48-
runs-on: ubuntu-latest
49-
permissions: write-all
50-
51-
steps:
52-
- uses: actions/checkout@v3
53-
54-
# Points to a recent commit instead of `main` to avoid supply chain attacks. (The latest tag is very old.)
55-
- name: 🎟 Get GitHub App token
56-
uses: navikt/github-app-token-generator@a3831f44404199df32d8f39f7c0ad9bb8fa18b1c
57-
id: get-token
58-
with:
59-
app-id: ${{ secrets.GH_APP_ID }}
60-
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
61-
62-
- name: 🗑 Delete deployment environment
63-
uses: strumwolf/[email protected]
64-
with:
65-
# Use a JWT created with your GitHub App's private key
66-
token: ${{ steps.get-token.outputs.token }}
67-
environment: pr-${{ github.event.number }}
68-
ref: ${{ github.ref_name }}
69-
70-
```
31+
32+
#### Example
33+
34+
`cleanup-pr.yml`
35+
36+
```yml
37+
#
38+
# Cleans up a GitHub PR
39+
#
40+
name: 🧼 Clean up environment
41+
on:
42+
pull_request:
43+
types:
44+
- closed
45+
46+
jobs:
47+
cleanup:
48+
runs-on: ubuntu-latest
49+
permissions: write-all
50+
51+
steps:
52+
- uses: actions/checkout@v3
53+
54+
# Points to a recent commit instead of `main` to avoid supply chain attacks. (The latest tag is very old.)
55+
- name: 🎟 Get GitHub App token
56+
uses: navikt/github-app-token-generator@a3831f44404199df32d8f39f7c0ad9bb8fa18b1c
57+
id: get-token
58+
with:
59+
app-id: ${{ secrets.GH_APP_ID }}
60+
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
61+
62+
- name: 🗑 Delete deployment environment
63+
uses: strumwolf/[email protected]
64+
with:
65+
# Use a JWT created with your GitHub App's private key
66+
token: ${{ steps.get-token.outputs.token }}
67+
environment: pr-${{ github.event.number }}
68+
ref: ${{ github.ref_name }}
69+
```
7170
7271
## Inputs
7372

action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ inputs:
2121
description: Only inactive deployments, keep the environment and deployments. Defaults to false
2222
required: false
2323
runs:
24-
using: 'node16'
24+
using: node20
2525
main: 'dist/index.js'

0 commit comments

Comments
 (0)