Skip to content

Commit

Permalink
chore: gha - pin actions to commit hashes
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Fiedorowicz <[email protected]>
  • Loading branch information
mfiedorowicz committed Dec 24, 2024
1 parent c586117 commit 409d9e3
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 32 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/go-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ jobs:
working-directory: diode-server
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5
with:
go-version: '1.23'
go-version: '1.23.x'
check-latest: true
- name: Run go build
run: go build ./...
Expand All @@ -48,14 +48,14 @@ jobs:
echo 'EOF' >> $GITHUB_OUTPUT
echo "coverage-total=$(cat .coverage/coverage.txt)" >> $GITHUB_OUTPUT
- name: Find comment
uses: peter-evans/find-comment@v3
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3
id: existing-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Go test coverage
- name: Post comment
uses: peter-evans/create-or-update-comment@v4
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
with:
comment-id: ${{ steps.existing-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5
with:
go-version: '1.23'
go-version: '1.23.x'
check-latest: true
- name: Lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6
with:
version: v1.62
working-directory: diode-server
args: --config ../.github/golangci.yaml
skip-pkg-cache: true
skip-build-cache: true
4 changes: 2 additions & 2 deletions .github/workflows/helm-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
working-directory: charts
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Helm
uses: azure/setup-helm@v4.2.0
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4
- name: Update helm dependencies
run: helm dependency update diode
- name: Run helm lint
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/helm-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ jobs:
working-directory: charts
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Setup Helm
uses: azure/setup-helm@v4.2.0
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4
- name: Update helm dependencies
run: |
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo add jetstack https://charts.jetstack.io
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Run chart-releaser
uses: helm/[email protected]
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_RELEASE_NAME_TEMPLATE: helm-chart-{{ .Name }}-{{ .Version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/labeler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/labeler@v5
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5

Check notice

Code scanning / CodeQL

Unversioned Immutable Action Note

The workflow is using an eligible immutable action (
actions/checkout
) without semantic versioning
with:
configuration-path: '.github/pull_request_labeler.yaml'

Check notice

Code scanning / CodeQL

Unversioned Immutable Action Note

The workflow is using an eligible immutable action (
actions/labeler
) without semantic versioning
8 changes: 4 additions & 4 deletions .github/workflows/reusable_semantic_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:
group: semantic-release
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4

Check notice

Code scanning / CodeQL

Unversioned Immutable Action Note

The workflow is using an eligible immutable action (
actions/checkout
) without semantic versioning
with:
node-version: "21.4.0"
- name: Write package.json

Check notice

Code scanning / CodeQL

Unversioned Immutable Action Note

The workflow is using an eligible immutable action (
actions/setup-node
) without semantic versioning
uses: DamianReeves/write-file-action@master
uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3
with:
path: ${{ inputs.app_dir }}/package.json
write-mode: overwrite
Expand All @@ -46,7 +46,7 @@ jobs:
}
}
- name: Write .releaserc.json
uses: DamianReeves/write-file-action@master
uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3
with:
path: ${{ inputs.app_dir }}/.releaserc.json
write-mode: overwrite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ jobs:
run:
working-directory: ${{ inputs.app_dir }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4

Check notice

Code scanning / CodeQL

Unversioned Immutable Action Note

The workflow is using an eligible immutable action (
actions/checkout
) without semantic versioning
with:
node-version: "lts/*"
- name: Write package.json

Check notice

Code scanning / CodeQL

Unversioned Immutable Action Note

The workflow is using an eligible immutable action (
actions/setup-node
) without semantic versioning
uses: DamianReeves/write-file-action@master
uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3
with:
path: ${{ inputs.app_dir }}/package.json
write-mode: overwrite
Expand All @@ -53,7 +53,7 @@ jobs:
}
}
- name: Write .releaserc.json
uses: DamianReeves/write-file-action@master
uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3
with:
path: ${{ inputs.app_dir }}/.releaserc.json
write-mode: overwrite
Expand Down Expand Up @@ -118,5 +118,5 @@ jobs:
needs: get-next-version
if: needs.get-next-version.outputs.new-release-published == 'true'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: echo "The new release version is ${{ needs.get-next-version.outputs.new-release-version }} commit ${{ needs.get-next-version.outputs.short-sha }}"

Check notice

Code scanning / CodeQL

Unversioned Immutable Action Note

The workflow is using an eligible immutable action (
actions/checkout
) without semantic versioning
10 changes: 5 additions & 5 deletions .github/workflows/server-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ jobs:
BUILD_COMMIT: ${{ needs.get-next-version.outputs.short-sha }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3

- name: Login to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 #v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand All @@ -78,7 +78,7 @@ jobs:
echo $BUILD_VERSION > ./diode-server/version/BUILD_VERSION.txt
- name: Build image and push
uses: docker/build-push-action@v6
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6
with:
context: diode-server
file: diode-server/docker/Dockerfile-build
Expand Down

0 comments on commit 409d9e3

Please sign in to comment.