Skip to content

Commit 4240c8a

Browse files
chore: update workflows to improve context printing and credential handling
1 parent 23da9f2 commit 4240c8a

3 files changed

Lines changed: 25 additions & 6 deletions

File tree

.github/workflows/automated-tests.yaml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,26 @@ jobs:
1313
runs-on: ubuntu-latest
1414
timeout-minutes: 30
1515
steps:
16-
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
17-
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
18-
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
16+
- name: Print context
17+
run: |
18+
echo "🎉 The job was automatically triggered by a ${GITHUB_EVENT_NAME} event."
19+
echo "🐧 This job is now running on a ${RUNNER_OS} server hosted by GitHub!"
20+
echo "🔎 The name of your branch is ${GITHUB_REF} and your repository is ${GITHUB_REPOSITORY}."
21+
env:
22+
GITHUB_EVENT_NAME: ${{ github.event_name }}
23+
RUNNER_OS: ${{ runner.os }}
24+
GITHUB_REF: ${{ github.ref }}
25+
GITHUB_REPOSITORY: ${{ github.repository }}
1926
- name: Check out repository code
2027
uses: actions/checkout@v5
21-
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
22-
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
28+
with:
29+
persist-credentials: false
30+
- name: Confirm checkout
31+
run: |
32+
echo "💡 The ${GITHUB_REPOSITORY} repository has been cloned to the runner."
33+
echo "🖥️ The workflow is now ready to test your code on the runner."
34+
env:
35+
GITHUB_REPOSITORY: ${{ github.repository }}
2336
- name: Use Node.js
2437
uses: actions/setup-node@v5
2538
with:
@@ -31,4 +44,7 @@ jobs:
3144
run: node --run prettier
3245
- name: Check linting
3346
run: node --run lint
34-
- run: echo "🍏 This job's status is ${{ job.status }}."
47+
- name: Print job status
48+
run: echo "🍏 This job's status is ${JOB_STATUS}."
49+
env:
50+
JOB_STATUS: ${{ job.status }}

.github/workflows/codeql-analysis.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ jobs:
5757
steps:
5858
- name: Checkout repository
5959
uses: actions/checkout@v5
60+
with:
61+
persist-credentials: false
6062

6163
# Add any setup steps before running the `github/codeql-action/init` action.
6264
# This includes steps like installing compilers or runtimes (`actions/setup-node`

.github/workflows/superlinter.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
# super-linter needs the full git history to get the
3131
# list of files that changed across commits
3232
fetch-depth: 0
33+
persist-credentials: false
3334

3435
- name: install modules
3536
run: |

0 commit comments

Comments
 (0)