Skip to content

Commit a8675d0

Browse files
authored
Merge pull request #595 from shapehq/enhancement/adds-workflow-dispatch-to-action-lint
Adds workflow_dispatch to GitHub Actions linting workflow
2 parents 22db055 + cfe098a commit a8675d0

File tree

7 files changed

+21
-6
lines changed

7 files changed

+21
-6
lines changed

.github/workflows/action-lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: GitHub Actions linting
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
67
- develop

.github/workflows/build-docker-image.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@ jobs:
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 .

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
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:

.github/workflows/check-changes-to-env.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff 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,

.github/workflows/lint.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ jobs:
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

.github/workflows/run-unit-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
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:

.github/workflows/test-sql-queries.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
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: >-
@@ -28,6 +28,8 @@ jobs:
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

0 commit comments

Comments
 (0)