-
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
base: main
Are you sure you want to change the base?
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 |
---|---|---|
|
@@ -12,10 +12,10 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
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. 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 | ||
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 "43502315+logstashmachine@users.noreply.github.com" | ||
- 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-ruby
recommends 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
v1
version 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.
dependabot
will be the one actually bumping the version, see #17421