-
Notifications
You must be signed in to change notification settings - Fork 3.5k
github-actions: pin third-party actions #17420
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,11 +22,11 @@ jobs: | |
| main: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Set up Ruby | ||
| uses: ruby/setup-ruby@v1 | ||
| uses: ruby/setup-ruby@7886c6653556e1164c58a7603d88286b5f708293 # v1.228.0 | ||
| with: | ||
| ruby-version: '3.0' | ||
| - run: git config --global user.email "[email protected]" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,10 +12,10 @@ jobs: | |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need to confirm from docs-team if this will break anything.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. checkout@v3 vs checkout@v4 should work, see https://github.com/actions/checkout/blob/main/CHANGELOG.md#v400 As far as i see it was a major change as they moved to |
||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v3 | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 16.13.2 | ||
| cache: npm | ||
|
|
@@ -38,7 +38,7 @@ jobs: | |
| echo "::set-output name=LINT_RESULT::$LINT" | ||
|
|
||
| - name: Add PR comment | ||
| uses: actions/github-script@v6 | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| script: | | ||
|
|
@@ -58,7 +58,7 @@ jobs: | |
| } | ||
|
|
||
| - name: Throw error if linter fails | ||
| uses: actions/github-script@v6 | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const report = `${{ steps.run_docs_lint.outputs.LINT_RESULT }}` | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,15 +13,15 @@ jobs: | |
| if: github.event.issue.pull_request | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions-ecosystem/action-regex-match@v2 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no longer need if you land #17347 |
||
| - uses: actions-ecosystem/action-regex-match@9e6c4fb3d5e898f505be7a1fb6e7b0a278f6665b # v2.0.2 | ||
| id: regex-match | ||
| with: | ||
| text: ${{ github.event.comment.body }} | ||
| regex: '^@logstashmachine backport (main|[x0-9\.]+)$' | ||
| - if: ${{ steps.regex-match.outputs.group1 == '' }} | ||
| run: exit 1 | ||
| - name: Fetch logstash-core team member list | ||
| uses: tspascoal/get-user-teams-membership@v1 | ||
| uses: tspascoal/get-user-teams-membership@39b5264024b7c3bd7480de2f2c8d3076eed49ec5 # v1.0.4 | ||
| id: checkUserMember | ||
| with: | ||
| username: ${{ github.actor }} | ||
|
|
@@ -32,14 +32,14 @@ jobs: | |
| if: ${{ steps.checkUserMember.outputs.isTeamMember == 'false' }} | ||
| run: exit 1 | ||
| - name: checkout repo content | ||
| uses: actions/checkout@v2 | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| ref: 'main' | ||
| - run: git config --global user.email "[email protected]" | ||
| - run: git config --global user.name "logstashmachine" | ||
| - name: setup python | ||
| uses: actions/setup-python@v2 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: 3.8 | ||
| - run: | | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason to ping specific minor version?
setup-rubyrecommends using version and not to pin specific commit/release-version.Can you double check if this really we need?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For third-party GH actions we need to follow the hardening:
⏫ , that's what InfoSec asked us to do.
So I took the latest
v1version at that time.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dependabotwill be the one actually bumping the version, see #17421