File tree Expand file tree Collapse file tree 7 files changed +21
-6
lines changed Expand file tree Collapse file tree 7 files changed +21
-6
lines changed Original file line number Diff line number Diff line change 1
1
name : GitHub Actions linting
2
2
3
3
on :
4
+ workflow_dispatch :
4
5
push :
5
6
branches :
6
7
- develop
Original file line number Diff line number Diff line change 16
16
steps :
17
17
- name : Checkout Repository
18
18
uses : actions/checkout@v4
19
+ with :
20
+ persist-credentials : false
19
21
- name : Build Docker Image
20
22
run : docker build .
Original file line number Diff line number Diff line change 16
16
steps :
17
17
- name : Checkout Repository
18
18
uses : actions/checkout@v4
19
+ with :
20
+ persist-credentials : false
19
21
- name : Setup Node.js
20
22
uses : actions/setup-node@v4
21
23
with :
Original file line number Diff line number Diff line change @@ -16,16 +16,19 @@ jobs:
16
16
- name : Get PR Number
17
17
id : get-pr-number
18
18
run : |
19
- PR_NUMBER=$(echo "${{ github.ref } }" | awk 'BEGIN { FS = "/" } ; { print $3 }')
20
- echo "pr-number=${PR_NUMBER}" >> $GITHUB_OUTPUT
19
+ PR_NUMBER=$(echo "${GITHUB_REF }" | awk 'BEGIN { FS = "/" } ; { print $3 }')
20
+ echo "pr-number=${PR_NUMBER}" >> " $GITHUB_OUTPUT"
21
21
- name : Comment when dummy.txt changes
22
22
uses : actions/github-script@v7
23
+ env :
24
+ PR_NUMBER : ${{ steps.get-pr-number.outputs.pr-number }}
25
+ REPO : ${{ github.repository }}
23
26
with :
24
27
script : |
25
28
const filename = ".env.example"
26
29
const filenameSha256 = await sha256(filename)
27
- const diffURL = " https://github.com/${{ github.repository }} /pull/${{ steps.get-pr-number.outputs.pr-number }} /files#diff-" + filenameSha256
28
- const docsURL = " https://github.com/${{ github.repository }} /wiki/Setting-Environment-Variables"
30
+ const diffURL = ` https://github.com/${process.env.REPO} /pull/${process.env.PR_NUMBER} /files#diff-${ filenameSha256}`
31
+ const docsURL = ` https://github.com/${process.env.REPO} /wiki/Setting-Environment-Variables`
29
32
const commentBody = `⚠️ It looks like [${filename}](${diffURL}) has changed. Remember to update the [Setting Environment Variables](${docsURL}) article accordingly.`
30
33
const listComments = await github.rest.issues.listComments({
31
34
...context.repo,
Original file line number Diff line number Diff line change 14
14
name : Lint
15
15
runs-on : ubuntu-latest
16
16
steps :
17
- - uses : actions/checkout@v4
17
+ - name : Checkout Repository
18
+ uses : actions/checkout@v4
19
+ with :
20
+ persist-credentials : false
18
21
- name : Install modules
19
22
run : npm install
20
23
- name : Run ESLint
Original file line number Diff line number Diff line change 16
16
steps :
17
17
- name : Checkout Repository
18
18
uses : actions/checkout@v4
19
+ with :
20
+ persist-credentials : false
19
21
- name : Setup Node.js
20
22
uses : actions/setup-node@v4
21
23
with :
Original file line number Diff line number Diff line change 13
13
runs-on : ubuntu-latest
14
14
services :
15
15
postgres :
16
- image : postgres:latest
16
+ image : postgres:17.5
17
17
ports :
18
18
- 5432:5432
19
19
options : >-
28
28
steps :
29
29
- name : Checkout repository
30
30
uses : actions/checkout@v4
31
+ with :
32
+ persist-credentials : false
31
33
- name : Wait for PostgreSQL to be ready
32
34
run : |
33
35
until pg_isready -h localhost -p 5432; do
You can’t perform that action at this time.
0 commit comments