Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/actions-config-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
actions-config-validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
persist-credentials: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
persist-credentials: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
contents: read
steps:
- name: checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
persist-credentials: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
persist-credentials: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
persist-credentials: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
persist-credentials: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-latest-release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:

# Checkout your project's repository based on the commit SHA provided by the branch-deploy step
# It is important to only ever operate on the commit SHA (where possible) as commit SHA's are immutable and you know exactly what you are deploying
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ steps.branch-deploy.outputs.sha }}

Expand Down Expand Up @@ -205,7 +205,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checkout your projects repository
- uses: actions/checkout@v4
- uses: actions/checkout@v6
```

Sets up your `demo` job, uses an ubuntu runner, and checks out your repo - Just some standard setup for a general Action. We also add an `if:` statement here to only run this workflow on pull request comments to make it a little cleaner
Expand Down
4 changes: 2 additions & 2 deletions docs/deploying-commit-SHAs.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Instead of this:

- name: checkout
if: steps.branch-deploy.outputs.continue == 'true'
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ steps.branch-deploy.outputs.ref }} # <-- This is the branch name, can be risky
```
Expand All @@ -25,7 +25,7 @@ Do this:

- name: checkout
if: steps.branch-deploy.outputs.continue == 'true'
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ steps.branch-deploy.outputs.sha }} # <-- uses an exact commit SHA - safe!
```
Expand Down
22 changes: 11 additions & 11 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
uses: github/branch-deploy@vX.X.X

# If the branch-deploy Action was triggered, checkout our branch
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ steps.branch-deploy.outputs.sha }}

Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
# If the branch-deploy Action was triggered, checkout our branch
- name: Checkout
if: steps.branch-deploy.outputs.continue == 'true'
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ steps.branch-deploy.outputs.sha }}

Expand Down Expand Up @@ -220,7 +220,7 @@ jobs:
# If the branch-deploy Action was triggered, checkout our branch
- name: Checkout
if: steps.branch-deploy.outputs.continue == 'true'
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ steps.branch-deploy.outputs.sha }}

Expand Down Expand Up @@ -273,7 +273,7 @@ jobs:
# If the branch-deploy Action was triggered, checkout our branch
- name: Checkout
if: steps.branch-deploy.outputs.continue == 'true'
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ steps.branch-deploy.outputs.sha }}

Expand Down Expand Up @@ -329,7 +329,7 @@ jobs:
# If the branch-deploy Action was triggered, checkout our branch
- name: Checkout
if: ${{ steps.branch-deploy.outputs.continue == 'true' }}
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ steps.branch-deploy.outputs.sha }}

Expand Down Expand Up @@ -384,7 +384,7 @@ jobs:
# If the branch-deploy Action was triggered, checkout our branch
- name: Checkout
if: ${{ steps.branch-deploy.outputs.continue == 'true' }}
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ steps.branch-deploy.outputs.sha }}

Expand Down Expand Up @@ -466,7 +466,7 @@ jobs:
# If the branch-deploy Action was triggered, checkout our branch
- name: Checkout
if: ${{ steps.branch-deploy.outputs.continue == 'true' }}
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ steps.branch-deploy.outputs.sha }}

Expand Down Expand Up @@ -547,7 +547,7 @@ jobs:
steps:
# checkout the project's repository based on the commit SHA provided by the branch-deploy step
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ needs.trigger.outputs.sha }}

Expand Down Expand Up @@ -732,7 +732,7 @@ jobs:
steps:
# checkout the project's repository based on the commit SHA provided by the branch-deploy step
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ needs.trigger.outputs.sha }}

Expand Down Expand Up @@ -970,7 +970,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ needs.trigger.outputs.sha }}

Expand Down Expand Up @@ -1195,7 +1195,7 @@ jobs:
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ needs.start.outputs.sha }}

Expand Down
2 changes: 1 addition & 1 deletion docs/merge-commit-strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
# Otherwise, all subsequent steps will be skipped

# Check out the repository
- uses: actions/checkout@v4
- uses: actions/checkout@v6
if: ${{ steps.deployment-check.outputs.continue == 'true' }} # only run if the Action returned 'true' for the 'continue' output
with:
ref: ${{ steps.deployment-check.outputs.sha }} # checkout the EXACT sha of the default branch for deployment (latest commit on the default branch)
Expand Down