Skip to content

Commit

Permalink
ci: set persist-credentials to false for checkout action
Browse files Browse the repository at this point in the history
With this setting credentials are removed from the git configuration
before the action completes.
  • Loading branch information
siljekristensen committed Jun 13, 2024
1 parent ef6c21a commit e65bd40
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ jobs:
timeout-minutes: 15

steps:
- uses: actions/checkout@v4
- name: Git checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -44,7 +47,10 @@ jobs:
node-version: [14.x, 16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v4
- name: Git checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -84,8 +90,10 @@ jobs:
- validate-dependencies

steps:
- uses: actions/checkout@v4
- name: Git checkout
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Use Node.js 18.x
uses: actions/setup-node@v4
Expand Down Expand Up @@ -150,7 +158,10 @@ jobs:
timeout-minutes: 15

steps:
- uses: actions/checkout@v4
- name: Git checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
Expand All @@ -177,7 +188,10 @@ jobs:
timeout-minutes: 15

steps:
- uses: actions/checkout@v4
- name: Git checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ jobs:
node-version: [14.x, 16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v4
- name: Git checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand All @@ -41,8 +44,10 @@ jobs:
- test

steps:
- uses: actions/checkout@v4
- name: Git checkout
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Use Node.js 18.x
uses: actions/setup-node@v4
Expand Down

0 comments on commit e65bd40

Please sign in to comment.