Skip to content

Commit 8746f14

Browse files
authored
chore: lock gh actions on sha instead of tag (#715)
* chore: lock gh actions on sha instead of tag * address review comments
1 parent b766198 commit 8746f14

File tree

7 files changed

+12
-26
lines changed

7 files changed

+12
-26
lines changed

.github/workflows/lint_pr_title.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: "Lint PR title"
2-
32
on:
43
pull_request_target:
54
types:
@@ -14,7 +13,7 @@ jobs:
1413
name: Validate PR title
1514
runs-on: ubuntu-latest
1615
steps:
17-
- uses: amannn/action-semantic-pull-request@v5
16+
- uses: amannn/action-semantic-pull-request@b6bca70dcd3e56e896605356ce09b76f7e1e0d39 # ratchet:amannn/action-semantic-pull-request@v5
1817
env:
1918
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2019
with:

.github/workflows/pr-opened.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
---
21
name: PR opened
3-
42
on:
53
pull_request_target:
64
# GITHUB_TOKEN is readonly and the action will fail for Dependabot
@@ -15,7 +13,7 @@ jobs:
1513
permissions:
1614
pull-requests: write
1715
steps:
18-
- uses: actions/github-script@v6
16+
- uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # ratchet:actions/github-script@v6
1917
with:
2018
script: |
2119
// adds a comment to the PR (there is the issue API only which works work PRs too)

.github/workflows/release.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
name: Release
2-
32
on:
43
push:
54
branches:
65
- main
7-
6+
87
jobs:
98
release:
109
runs-on: ubuntu-latest
1110
steps:
1211
- name: Get app installation token
13-
uses: npalm/[email protected]
12+
uses: npalm/action-app-token@dd4bb16d91ced5659bc618705c96b822c5a42136 # ratchet:npalm/action-app-token@v1.1.0
1413
id: token
1514
with:
1615
appId: ${{ secrets.APP_ID }}
1716
appPrivateKeyBase64: ${{ secrets.APP_PRIVATE_KEY_BASE64 }}
1817
appInstallationType: repo
1918
appInstallationValue: ${{ github.repository }}
20-
2119
# bootstrap-sha and release-as needs to be removed after first release
2220
- name: Release
23-
uses: google-github-actions/release-please-action@v3
21+
uses: google-github-actions/release-please-action@d3c71f9a0a55385580de793de58da057b3560862 # ratchet:google-github-actions/release-please-action@v3
2422
with:
2523
release-type: terraform-module
2624
token: ${{ steps.token.outputs.token }}

.github/workflows/slash_ops_commands.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
---
21
name: Execute ChatOps command
3-
42
on:
53
repository_dispatch:
6-
types:
4+
types:
75
- help-command
86

97
jobs:
@@ -16,9 +14,8 @@ jobs:
1614
run: |
1715
maintainer=$(cat CODEOWNERS | grep -oE "@[a-zA-Z0-9_-]+" | shuf -n 1)
1816
echo "maintainer=$maintainer" >> "$GITHUB_OUTPUT"
19-
2017
- name: Create comment
21-
uses: actions/github-script@v6
18+
uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # ratchet:actions/github-script@v6
2219
with:
2320
script: |
2421
// adds a comment to the PR (there is the issue API, which works work PRs too)

.github/workflows/slash_ops_comment_dispatch.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
---
21
name: PR commented
3-
42
on:
53
issue_comment:
64
types:
@@ -11,7 +9,7 @@ jobs:
119
runs-on: ubuntu-latest
1210
steps:
1311
- name: Slash Command Dispatch
14-
uses: peter-evans/slash-command-dispatch@v3
12+
uses: peter-evans/slash-command-dispatch@a28ee6cd74d5200f99e247ebc7b365c03ae0ef3c # ratchet:peter-evans/slash-command-dispatch@v3
1513
with:
1614
token: ${{ secrets.GITHUB_TOKEN }}
1715
issue-type: pull-request

.github/workflows/stale.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: 'Close stale issues and PRs'
2-
32
on:
43
schedule:
54
- cron: '25 2 * * *'
@@ -8,7 +7,7 @@ jobs:
87
stale:
98
runs-on: ubuntu-latest
109
steps:
11-
- uses: actions/stale@v7
10+
- uses: actions/stale@6f05e4244c9a0b2ed3401882b05d701dd0a7289b # ratchet:actions/stale@v7
1211
with:
1312
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.'
1413
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.'

.github/workflows/update_docs.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Update docs
2-
32
on:
43
push:
54
branches:
@@ -10,14 +9,12 @@ jobs:
109
# update docs after merge back to develop
1110
name: Auto update terraform docs
1211
runs-on: ubuntu-latest
13-
1412
steps:
1513
- name: Checkout branch
16-
uses: actions/checkout@v3
17-
14+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # ratchet:actions/checkout@v3
1815
- name: Generate TF docs
19-
uses: terraform-docs/[email protected]
16+
uses: terraform-docs/gh-actions@f6d59f89a280fa0a3febf55ef68f146784b20ba0 # ratchet:terraform-docs/gh-actions@v1.0.0
2017
with:
2118
find-dir: .
2219
git-commit-message: "docs: auto update terraform docs"
23-
git-push: true
20+
git-push: true

0 commit comments

Comments
 (0)