Skip to content

Commit c107005

Browse files
Replaced workflow actions Tag with commit SHA
1 parent 439530b commit c107005

File tree

3 files changed

+33
-33
lines changed

3 files changed

+33
-33
lines changed

.github/workflows/merge-to-master.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ jobs:
1313
steps:
1414
# We can't go past 1.20.X until this issue is solved: https://github.com/golang/go/issues/62130#issuecomment-1687335898
1515
- name: Set up Go 1.20.7
16-
uses: actions/setup-go@v4
16+
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
1717
with:
1818
go-version: '1.20.7'
1919

2020
- name: Check go version
2121
run: go version
2222

2323
- name: Checkout code
24-
uses: actions/checkout@v2
24+
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
2525

2626
- name: Run unit tests
2727
run: go test ./...
@@ -55,29 +55,29 @@ jobs:
5555

5656
# The QEMU will include more platforms such as arm64 to docker buildx builder
5757
- name: Set up QEMU
58-
uses: docker/setup-qemu-action@v1
58+
uses: docker/setup-qemu-action@27d0a4f181a40b142cce983c5393082c365d1480 # v1
5959

6060
# The Docker Buildx builder will be used later to leverage from the cache while building the image
6161
- name: Set up Docker Buildx
6262
id: buildx
63-
uses: docker/setup-buildx-action@master
63+
uses: docker/setup-buildx-action@afeb29a6e0d7d6258844ecabe6eba67d13443680 # master
6464

6565
# Cache to be used by Docker Buildx
6666
- name: Set up Docker Buildx's cache
67-
uses: actions/cache@v2
67+
uses: actions/cache@8492260343ad570701412c2f464a5877dc76bace # v2
6868
with:
6969
path: /tmp/.buildx-cache
7070
key: ${{ runner.os }}-buildx-${{ github.sha }}
7171
restore-keys: ${{ runner.os }}-buildx-
7272

7373
- name: Login to Docker Hub
74-
uses: docker/login-action@v1
74+
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7 # v1
7575
with:
7676
username: ${{ secrets.DOCKER_HUB_USERNAME }}
7777
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
7878

7979
- name: Build and Publish Docker image
80-
uses: docker/build-push-action@v2
80+
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a # v2
8181
env:
8282
DOCKERHUB_REPOSITORY: newrelic/newrelic-fluentbit-output
8383
IMAGE_TAG: ${{ env.VERSION }}
@@ -97,7 +97,7 @@ jobs:
9797
run: docker buildx imagetools inspect newrelic/newrelic-fluentbit-output:${{ env.VERSION }}
9898

9999
- name: Build and Publish Docker debug image
100-
uses: docker/build-push-action@v2
100+
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a # v2
101101
env:
102102
DOCKERHUB_REPOSITORY: newrelic/newrelic-fluentbit-output
103103
IMAGE_TAG: ${{ env.VERSION }}-debug
@@ -116,18 +116,18 @@ jobs:
116116
run: docker buildx imagetools inspect newrelic/newrelic-fluentbit-output:${{ env.VERSION }}-debug
117117

118118
- name: Configure AWS credentials
119-
uses: aws-actions/configure-aws-credentials@v1
119+
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # v1
120120
with:
121121
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
122122
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
123123
aws-region: us-east-2
124124

125125
- name: Login to Amazon ECR
126126
id: login-ecr
127-
uses: aws-actions/amazon-ecr-login@v1
127+
uses: aws-actions/amazon-ecr-login@2fc7aceee09e9e4a7105c0d060c656fad0b4f63d # v1
128128

129129
- name: Build and Publish Docker image for Firelens
130-
uses: docker/build-push-action@v2
130+
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a # v2
131131
env:
132132
ECR_REGISTRY: 533243300146.dkr.ecr.us-east-2.amazonaws.com
133133
ECR_REPOSITORY: newrelic/logging-firelens-fluentbit
@@ -150,7 +150,7 @@ jobs:
150150

151151
- name: Create Release
152152
id: create_release
153-
uses: actions/create-release@v1
153+
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1
154154
env:
155155
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
156156
with:
@@ -160,7 +160,7 @@ jobs:
160160
prerelease: false
161161

162162
- name: Include linux-amd64 artifact in release
163-
uses: actions/upload-release-asset@v1
163+
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1
164164
env:
165165
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
166166
with:
@@ -170,7 +170,7 @@ jobs:
170170
asset_content_type: application/octet-stream
171171

172172
- name: Include windows-amd64 artifact in release
173-
uses: actions/upload-release-asset@v1
173+
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1
174174
env:
175175
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
176176
with:
@@ -180,7 +180,7 @@ jobs:
180180
asset_content_type: application/octet-stream
181181

182182
- name: Include windows-386 artifact in release
183-
uses: actions/upload-release-asset@v1
183+
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1
184184
env:
185185
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
186186
with:
@@ -190,7 +190,7 @@ jobs:
190190
asset_content_type: application/octet-stream
191191

192192
- name: Include linux-arm64 artifact in release
193-
uses: actions/upload-release-asset@v1
193+
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1
194194
env:
195195
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
196196
with:
@@ -200,7 +200,7 @@ jobs:
200200
asset_content_type: application/octet-stream
201201

202202
- name: Include linux-arm artifact in release
203-
uses: actions/upload-release-asset@v1
203+
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1
204204
env:
205205
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
206206
with:
@@ -231,7 +231,7 @@ jobs:
231231

232232
steps:
233233
- name: Checkout code
234-
uses: actions/checkout@v2
234+
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
235235

236236
- name: Determine new plugin version
237237
run: |
@@ -241,7 +241,7 @@ jobs:
241241
Add-Content -Path $env:GITHUB_ENV -Value "VERSION=$env:VERSION"
242242
243243
- name: Login to Docker Hub
244-
uses: docker/login-action@v1
244+
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7 # v1
245245
with:
246246
username: ${{ secrets.DOCKER_HUB_USERNAME }}
247247
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

.github/workflows/pr.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
steps:
1111
# We can't go past 1.20.X until this issue is solved: https://github.com/golang/go/issues/62130#issuecomment-1687335898
1212
- name: Set up Go 1.20.7
13-
uses: actions/setup-go@v4
13+
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
1414
with:
1515
go-version: '1.20.7'
1616
id: go
@@ -19,15 +19,15 @@ jobs:
1919
run: go version
2020

2121
- name: Checkout code
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
2323

2424
- name: Run unit tests
2525
run: |
2626
go install -v github.com/jstemmer/go-junit-report@latest
2727
go test -v ./... 2>&1 | go-junit-report -set-exit-code=1 > test-results.xml
2828
2929
- name: Publish Unit Test Results
30-
uses: EnricoMi/[email protected]
30+
uses: EnricoMi/publish-unit-test-result-action@39ee91a16bb587a6c2b4791d4954cf5299736efd # v2.6.2
3131
if: always()
3232
with:
3333
files: test-results.xml
@@ -59,31 +59,31 @@ jobs:
5959

6060
steps:
6161
- name: Checkout code
62-
uses: actions/checkout@v2
62+
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
6363

6464
# The QEMU will include more platforms such as arm64 to docker buildx builder
6565
- name: Set up QEMU
66-
uses: docker/setup-qemu-action@v1
66+
uses: docker/setup-qemu-action@27d0a4f181a40b142cce983c5393082c365d1480 # v1
6767

6868
# The Docker Buildx builder will be used later to leverage from the cache while building the image
6969
- name: Set up Docker Buildx
7070
id: buildx
71-
uses: docker/setup-buildx-action@master
71+
uses: docker/setup-buildx-action@afeb29a6e0d7d6258844ecabe6eba67d13443680 # master
7272
with:
7373
# This option is required to avoid this problem https://github.com/docker/for-mac/issues/3611#issuecomment-479507361
7474
# We need this option to be able to push to the local registry service used by the integration tests.
7575
driver-opts: network=host
7676

7777
# Cache to be used by Docker Buildx
7878
- name: Set up Docker Buildx's cache
79-
uses: actions/cache@v2
79+
uses: actions/cache@8492260343ad570701412c2f464a5877dc76bace # v2
8080
with:
8181
path: /tmp/.buildx-cache
8282
key: ${{ runner.os }}-buildx-${{ github.sha }}
8383
restore-keys: ${{ runner.os }}-buildx-
8484

8585
- name: Build Docker image (${{ matrix.name }})
86-
uses: docker/build-push-action@v2
86+
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a # v2
8787
with:
8888
context: ./
8989
file: ./${{ matrix.dockerfile }}
@@ -100,7 +100,7 @@ jobs:
100100
TRIVY_NON_SSL: true
101101
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
102102
# Versions 0.26.0 and above are causing an issue where the image can't be fetched because the image name is not being resolved.
103-
uses: aquasecurity/[email protected]
103+
uses: aquasecurity/trivy-action@f781cce5aab226378ee181d764ab90ea0be3cdd8 # 0.25.0
104104
with:
105105
image-ref: registry:5000/fb-output-plugin-${{ matrix.name }}
106106
format: table
@@ -113,7 +113,7 @@ jobs:
113113
TRIVY_NON_SSL: true
114114
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
115115
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db
116-
uses: aquasecurity/[email protected]
116+
uses: aquasecurity/trivy-action@f781cce5aab226378ee181d764ab90ea0be3cdd8 # 0.25.0
117117
with:
118118
image-ref: registry:5000/fb-output-plugin-${{ matrix.name }}
119119
format: table
@@ -149,7 +149,7 @@ jobs:
149149

150150
steps:
151151
- name: Checkout code
152-
uses: actions/checkout@v2
152+
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
153153

154154
- name: Build container for ${{ matrix.name }}
155155
env:

.github/workflows/repolinter.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ jobs:
1515
steps:
1616
- name: Test Default Branch
1717
id: default-branch
18-
uses: actions/github-script@v2
18+
uses: actions/github-script@4aed96e0ba636e3df2423e6887c9a83ef8522d6d # v2
1919
with:
2020
script: |
2121
const data = await github.repos.get(context.repo)
2222
return data.data && data.data.default_branch === context.ref.split('/').slice(-1)[0]
2323
- name: Checkout Self
2424
if: ${{ steps.default-branch.outputs.result == 'true' }}
25-
uses: actions/checkout@v2
25+
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
2626
- name: Run Repolinter
2727
if: ${{ steps.default-branch.outputs.result == 'true' }}
28-
uses: newrelic/repolinter-action@v1
28+
uses: newrelic/repolinter-action@3f4448f855c351e9695b24524a4111c7847b84cb # v1
2929
with:
3030
config_url: https://raw.githubusercontent.com/newrelic/.github/main/repolinter-rulesets/community-plus.yml
3131
output_type: issue

0 commit comments

Comments
 (0)