Skip to content

Commit

Permalink
Merge pull request #571 from apigee/issue570
Browse files Browse the repository at this point in the history
chore: pin dependencies #570
  • Loading branch information
ssvaidyanathan authored Nov 6, 2024
2 parents 5626403 + 013ebe5 commit 63e83f1
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 17 deletions.
9 changes: 6 additions & 3 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ FROM mcr.microsoft.com/devcontainers/go:1.23-bookworm@@sha256:2e00578e7c526e76eb

COPY --from=cosign /ko-app/cosign /usr/bin

RUN go install github.com/google/addlicense@latest
#v1.1.1
RUN go install github.com/google/addlicense@@dc31ac9ffcca99c9457226366135701794b128c0

RUN go install github.com/google/go-licenses@latest
# v1.6.0
RUN go install github.com/google/go-licenses@5348b744d0983d85713295ea08a20cca1654a45e

RUN go install mvdan.cc/gofumpt@latest
# v0.7.0
RUN go install mvdan.cc/gofumpt@86bffd62437a3c437c0b84d5d5ab244824e762fc

RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 #v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 #v4
with:
fetch-depth: 1

Expand Down Expand Up @@ -134,15 +134,15 @@ jobs:
sbom-artifact-match: ".*\\.spdx$"

- name: Attest build provenance
uses: actions/attest-build-provenance@v1
uses: actions/attest-build-provenance@ef244123eb79f2f7a7e75d99086184180e6d0018 #v1.4.4
id: attest
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.build-and-push.outputs.digest }}
push-to-registry: true

- name: Attest SBOM
uses: actions/attest-sbom@v1
uses: actions/attest-sbom@5026d3663739160db546203eeaffa6aa1c51a4d6 #v1.4.1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.build-and-push.outputs.digest }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gen-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 #v4
- name: Push GH Pages
run: |
git config pull.rebase false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 #v5
with:
go-version: '1.23'
cache: false
- uses: actions/checkout@v4
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 #v4
- name: golangci-lint
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 #v6.1.1
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/gorelease-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,26 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 #v4
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 #v5
with:
#go-version: '>=1.18.0'
go-version-file: './go.mod'
check-latest: true

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 #v6.1.1
with:
version: latest
args: --timeout=4m

- name: Write private key to disk
run: echo "${{ secrets.COSIGN_PRIVATE_KEY }}" > /tmp/cosign.key

- uses: sigstore/cosign-installer@main
- uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da #v3.7.0

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 #v6
with:
distribution: goreleaser
version: latest
Expand All @@ -56,7 +56,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.TOKEN }}

- name: Upload assets
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
with:
name: apigeecli
path: dist/*
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN go mod download
RUN date +%FT%H:%I:%M+%Z > /tmp/date
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -buildvcs=true -a -gcflags='all="-l"' -ldflags='-s -w -extldflags "-static" -X main.version='${TAG}' -X main.commit='${COMMIT}' -X main.date='$(cat /tmp/date) -o /go/bin/apigeecli /go/src/apigeecli/cmd/apigeecli/apigeecli.go

FROM ghcr.io/jqlang/jq:latest AS jq
FROM ghcr.io/jqlang/jq:1.7.1@sha256:096b83865ad59b5b02841f103f83f45c51318394331bf1995e187ea3be937432 AS jq

# use debug because it includes busybox
FROM gcr.io/distroless/static-debian11:debug-nonroot@sha256:55716e80a7d4320ce9bc2dc8636fc193b418638041b817cf3306696bd0f975d1
Expand Down

0 comments on commit 63e83f1

Please sign in to comment.