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 11name : GitHub Actions linting
22
33on :
4+ workflow_dispatch :
45 push :
56 branches :
67 - develop
Original file line number Diff line number Diff line change 1616 steps :
1717 - name : Checkout Repository
1818 uses : actions/checkout@v4
19+ with :
20+ persist-credentials : false
1921 - name : Build Docker Image
2022 run : docker build .
Original file line number Diff line number Diff line change 1616 steps :
1717 - name : Checkout Repository
1818 uses : actions/checkout@v4
19+ with :
20+ persist-credentials : false
1921 - name : Setup Node.js
2022 uses : actions/setup-node@v4
2123 with :
Original file line number Diff line number Diff line change @@ -16,16 +16,19 @@ jobs:
1616 - name : Get PR Number
1717 id : get-pr-number
1818 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"
2121 - name : Comment when dummy.txt changes
2222 uses : actions/github-script@v7
23+ env :
24+ PR_NUMBER : ${{ steps.get-pr-number.outputs.pr-number }}
25+ REPO : ${{ github.repository }}
2326 with :
2427 script : |
2528 const filename = ".env.example"
2629 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`
2932 const commentBody = `⚠️ It looks like [${filename}](${diffURL}) has changed. Remember to update the [Setting Environment Variables](${docsURL}) article accordingly.`
3033 const listComments = await github.rest.issues.listComments({
3134 ...context.repo,
Original file line number Diff line number Diff line change 1414 name : Lint
1515 runs-on : ubuntu-latest
1616 steps :
17- - uses : actions/checkout@v4
17+ - name : Checkout Repository
18+ uses : actions/checkout@v4
19+ with :
20+ persist-credentials : false
1821 - name : Install modules
1922 run : npm install
2023 - name : Run ESLint
Original file line number Diff line number Diff line change 1616 steps :
1717 - name : Checkout Repository
1818 uses : actions/checkout@v4
19+ with :
20+ persist-credentials : false
1921 - name : Setup Node.js
2022 uses : actions/setup-node@v4
2123 with :
Original file line number Diff line number Diff line change 1313 runs-on : ubuntu-latest
1414 services :
1515 postgres :
16- image : postgres:latest
16+ image : postgres:17.5
1717 ports :
1818 - 5432:5432
1919 options : >-
2828 steps :
2929 - name : Checkout repository
3030 uses : actions/checkout@v4
31+ with :
32+ persist-credentials : false
3133 - name : Wait for PostgreSQL to be ready
3234 run : |
3335 until pg_isready -h localhost -p 5432; do
You can’t perform that action at this time.
0 commit comments