Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update actions/checkout action to v4 #2225

Merged
merged 1 commit into from
Oct 8, 2023
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/generate-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'pinterest/ktlint'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can replace these hash strings with v4, instead of annoying updates by Renovate.

@paul-dingemans

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to Github best practices, the safest approach is to use the SHA commit id instead of version tags. See https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but the following updates will be a little frequent.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I wil see what happens. If it annoys me too much, I can always remove the SHA's and fallback to the version numbers.

with:
fetch-depth: 0 # fetch all commits/branches/tags

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ jobs:
name: "Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: gradle/wrapper-validation-action@v1
2 changes: 1 addition & 1 deletion .github/workflows/publish-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
if: github.repository == 'pinterest/ktlint'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with:
ref: 'master'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-release-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'pinterest/ktlint'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with:
fetch-depth: 0 # fetch all commits/branches
- uses: actions/setup-python@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-snapshot-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'pinterest/ktlint'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4

- uses: ./.github/actions/setup-gradle-build

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-snapshot-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'pinterest/ktlint'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with:
fetch-depth: 0 # fetch all commits/branches
- uses: actions/setup-python@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pull-request-with-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
runs-on: ${{ matrix.os }}
name: "[build] OS=${{ matrix.os }} Kotlin=stable"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4

- uses: ./.github/actions/setup-gradle-build

Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
runs-on: ${{ matrix.os }}
name: "[build] OS=${{ matrix.os }}, Kotlin=dev"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4

- uses: ./.github/actions/setup-gradle-build

Expand All @@ -87,7 +87,7 @@ jobs:
runs-on: ${{ matrix.os }}
name: "[tests] OS=${{ matrix.os }}, Java=${{ matrix.jdk }}"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4

- uses: ./.github/actions/setup-gradle-build
with:
Expand Down