From 11d797a2e19442aeb37af1720f03bddb0cf0633e Mon Sep 17 00:00:00 2001 From: Marco Franssen Date: Tue, 3 Jan 2023 14:03:23 +0100 Subject: [PATCH] Pin GH actions Dependabot is also capable of pinning to future tag releases and will maintain the comment that descibes the shasum. https://github.com/dependabot/dependabot-core/issues/4691 Signed-off-by: Marco Franssen --- .github/workflows/depsreview.yaml | 4 +- .github/workflows/nightly_build.yaml | 6 +- .github/workflows/pr_build.yaml | 145 +++++++++++------------- .github/workflows/release_build.yaml | 163 ++++++++++++--------------- 4 files changed, 145 insertions(+), 173 deletions(-) diff --git a/.github/workflows/depsreview.yaml b/.github/workflows/depsreview.yaml index 58da4b9dddc..386bfa2a79a 100644 --- a/.github/workflows/depsreview.yaml +++ b/.github/workflows/depsreview.yaml @@ -10,6 +10,6 @@ jobs: steps: - name: 'Checkout Repository' - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: 'Dependency Review' - uses: actions/dependency-review-action@v3 + uses: actions/dependency-review-action@0ff3da6f81b812d4ec3cf37a04e2308c7a723730 # ratchet:actions/dependency-review-action@v3 diff --git a/.github/workflows/nightly_build.yaml b/.github/workflows/nightly_build.yaml index 7eddbd6b6d4..c520da2ef12 100644 --- a/.github/workflows/nightly_build.yaml +++ b/.github/workflows/nightly_build.yaml @@ -18,11 +18,11 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Build images run: make images scratch-images - name: Log in to GCR - uses: docker/login-action@v2 + uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # ratchet:docker/login-action@v2 with: registry: gcr.io username: _json_key @@ -30,7 +30,7 @@ jobs: - name: Push images run: ./.github/workflows/scripts/push-images.sh nightly - name: Log in to GHCR - uses: docker/login-action@v2 + uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # ratchet:docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} diff --git a/.github/workflows/pr_build.yaml b/.github/workflows/pr_build.yaml index 4bed964df63..3a0486fe996 100644 --- a/.github/workflows/pr_build.yaml +++ b/.github/workflows/pr_build.yaml @@ -17,13 +17,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Setup dep cache - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} @@ -40,18 +40,18 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Setup build tool cache - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: .build key: ${{ runner.os }}-tools-${{ github.sha }} @@ -78,13 +78,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} @@ -101,13 +101,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} @@ -124,18 +124,18 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Load cached build tools - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: .build key: ${{ runner.os }}-tools-${{ github.sha }} @@ -144,7 +144,7 @@ jobs: - name: Build artifacts run: ./.github/workflows/scripts/build_artifacts.sh - name: Archive artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # ratchet:actions/upload-artifact@v3 with: name: binaries path: ./artifacts/ @@ -159,18 +159,18 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Load cached build tools - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: .build key: ${{ runner.os }}-tools-${{ github.sha }} @@ -181,7 +181,7 @@ jobs: - name: Export images run: docker save spire-server:latest-local spire-agent:latest-local k8s-workload-registrar:latest-local oidc-discovery-provider:latest-local | gzip > images.tar.gz - name: Archive images - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # ratchet:actions/upload-artifact@v3 with: name: images path: images.tar.gz @@ -196,9 +196,9 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # ratchet:actions/download-artifact@v3 with: name: bin-windows path: ./bin/ @@ -209,7 +209,7 @@ jobs: docker save spire-server-windows:latest-local spire-agent-windows:latest-local oidc-discovery-provider-windows:latest-local -o images-windows.tar gzip images-windows.tar - name: Archive images - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # ratchet:actions/upload-artifact@v3 with: name: images-windows path: images-windows.tar.gz @@ -223,18 +223,18 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Load cached build tools - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: .build key: ${{ runner.os }}-tools-${{ github.sha }} @@ -245,7 +245,7 @@ jobs: - name: Export scratch images run: docker save spire-server-scratch:latest-local spire-agent-scratch:latest-local k8s-workload-registrar-scratch:latest-local oidc-discovery-provider-scratch:latest-local | gzip > scratch-images.tar.gz - name: Archive scratch images - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # ratchet:actions/upload-artifact@v3 with: name: scratch-images path: scratch-images.tar.gz @@ -265,7 +265,7 @@ jobs: runner_id: [1, 2, 3, 4, 5] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 with: # The "upgrade" integration test needs the history to ensure # that the version number in the source code has been bumped as @@ -273,28 +273,28 @@ jobs: # fetch depth of zero. fetch-depth: 0 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Load cached build tools - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: .build key: ${{ runner.os }}-tools-${{ github.sha }} restore-keys: | ${{ runner.os }}-tools- - name: Download archived images - uses: actions/download-artifact@v3 + uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # ratchet:actions/download-artifact@v3 with: name: images path: . - name: Download archived scratch images - uses: actions/download-artifact@v3 + uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # ratchet:actions/download-artifact@v3 with: name: scratch-images path: . @@ -323,36 +323,33 @@ jobs: shell: msys2 {0} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Load cached build tools - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: .build key: ${{ runner.os }}-tools-${{ github.sha }} restore-keys: | ${{ runner.os }}-tools- - name: Install msys2 - uses: msys2/setup-msys2@v2 + uses: msys2/setup-msys2@d40200dc2db4c351366b048a9565ad82919e1c24 # ratchet:msys2/setup-msys2@v2 with: msystem: MINGW64 update: true path-type: inherit install: >- - git - base-devel - mingw-w64-x86_64-toolchain - unzip + git base-devel mingw-w64-x86_64-toolchain unzip - name: Download archived images - uses: actions/download-artifact@v3 + uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # ratchet:actions/download-artifact@v3 with: name: images-windows path: . @@ -371,13 +368,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Setup dep cache - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} @@ -397,33 +394,30 @@ jobs: shell: msys2 {0} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Setup build tool cache - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: .build key: ${{ runner.os }}-tools-${{ github.sha }} restore-keys: | ${{ runner.os }}-tools- - name: Install msys2 - uses: msys2/setup-msys2@v2 + uses: msys2/setup-msys2@d40200dc2db4c351366b048a9565ad82919e1c24 # ratchet:msys2/setup-msys2@v2 with: msystem: MINGW64 update: true install: >- - git - base-devel - mingw-w64-x86_64-toolchain - unzip + git base-devel mingw-w64-x86_64-toolchain unzip - name: Lint run: make lint-code - name: Tidy check @@ -444,26 +438,23 @@ jobs: shell: msys2 {0} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Install msys2 - uses: msys2/setup-msys2@v2 + uses: msys2/setup-msys2@d40200dc2db4c351366b048a9565ad82919e1c24 # ratchet:msys2/setup-msys2@v2 with: msystem: MINGW64 update: true install: >- - git - base-devel - mingw-w64-x86_64-toolchain - unzip + git base-devel mingw-w64-x86_64-toolchain unzip - name: Run unit tests run: ./.github/workflows/scripts/run_unit_tests.sh @@ -480,43 +471,39 @@ jobs: shell: msys2 {0} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Load cached build tools - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: .build key: ${{ runner.os }}-tools-${{ github.sha }} restore-keys: | ${{ runner.os }}-tools- - name: Install msys2 - uses: msys2/setup-msys2@v2 + uses: msys2/setup-msys2@d40200dc2db4c351366b048a9565ad82919e1c24 # ratchet:msys2/setup-msys2@v2 with: msystem: MINGW64 update: true install: >- - git - base-devel - mingw-w64-x86_64-toolchain - zip - unzip + git base-devel mingw-w64-x86_64-toolchain zip unzip - name: Build artifacts run: ./.github/workflows/scripts/build_artifacts.sh - name: Archive binaries - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # ratchet:actions/upload-artifact@v3 with: name: bin-windows path: ./bin/ - name: Archive artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # ratchet:actions/upload-artifact@v3 with: name: binaries path: ./artifacts/ diff --git a/.github/workflows/release_build.yaml b/.github/workflows/release_build.yaml index 447c8e7bce0..76339f72fdf 100644 --- a/.github/workflows/release_build.yaml +++ b/.github/workflows/release_build.yaml @@ -15,13 +15,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Setup dep cache - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} @@ -38,18 +38,18 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Setup build tool cache - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: .build key: ${{ runner.os }}-tools-${{ github.sha }} @@ -76,13 +76,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} @@ -99,13 +99,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} @@ -122,18 +122,18 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Load cached build tools - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: .build key: ${{ runner.os }}-tools-${{ github.sha }} @@ -142,7 +142,7 @@ jobs: - name: Build artifacts run: ./.github/workflows/scripts/build_artifacts.sh - name: Archive artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # ratchet:actions/upload-artifact@v3 with: name: binaries path: ./artifacts/ @@ -157,18 +157,18 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Load cached build tools - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: .build key: ${{ runner.os }}-tools-${{ github.sha }} @@ -179,7 +179,7 @@ jobs: - name: Export images run: docker save spire-server:latest-local spire-agent:latest-local k8s-workload-registrar:latest-local oidc-discovery-provider:latest-local | gzip > images.tar.gz - name: Archive images - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # ratchet:actions/upload-artifact@v3 with: name: images path: images.tar.gz @@ -194,9 +194,9 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # ratchet:actions/download-artifact@v3 with: name: bin-windows path: ./bin/ @@ -207,7 +207,7 @@ jobs: docker save spire-server-windows:latest-local spire-agent-windows:latest-local oidc-discovery-provider-windows:latest-local -o images-windows.tar gzip images-windows.tar - name: Archive images - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # ratchet:actions/upload-artifact@v3 with: name: images-windows path: images-windows.tar.gz @@ -221,18 +221,18 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Load cached build tools - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: .build key: ${{ runner.os }}-tools-${{ github.sha }} @@ -243,7 +243,7 @@ jobs: - name: Export scratch images run: docker save spire-server-scratch:latest-local spire-agent-scratch:latest-local k8s-workload-registrar-scratch:latest-local oidc-discovery-provider-scratch:latest-local | gzip > scratch-images.tar.gz - name: Archive scratch images - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # ratchet:actions/upload-artifact@v3 with: name: scratch-images path: scratch-images.tar.gz @@ -263,7 +263,7 @@ jobs: runner_id: [1, 2, 3, 4, 5] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 with: # The "upgrade" integration test needs the history to ensure # that the version number in the source code has been bumped as @@ -280,28 +280,28 @@ jobs: - name: Fix tag annotations run: git fetch --tags --force - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Load cached build tools - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: .build key: ${{ runner.os }}-tools-${{ github.sha }} restore-keys: | ${{ runner.os }}-tools- - name: Download archived images - uses: actions/download-artifact@v3 + uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # ratchet:actions/download-artifact@v3 with: name: images path: . - name: Download archived scratch images - uses: actions/download-artifact@v3 + uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # ratchet:actions/download-artifact@v3 with: name: scratch-images path: . @@ -332,36 +332,33 @@ jobs: shell: msys2 {0} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Load cached build tools - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: .build key: ${{ runner.os }}-tools-${{ github.sha }} restore-keys: | ${{ runner.os }}-tools- - name: Install msys2 - uses: msys2/setup-msys2@v2 + uses: msys2/setup-msys2@d40200dc2db4c351366b048a9565ad82919e1c24 # ratchet:msys2/setup-msys2@v2 with: msystem: MINGW64 update: true path-type: inherit install: >- - git - base-devel - mingw-w64-x86_64-toolchain - unzip + git base-devel mingw-w64-x86_64-toolchain unzip - name: Download archived images - uses: actions/download-artifact@v3 + uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # ratchet:actions/download-artifact@v3 with: name: images-windows path: . @@ -380,13 +377,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Setup dep cache - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} @@ -406,33 +403,30 @@ jobs: shell: msys2 {0} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Setup build tool cache - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: .build key: ${{ runner.os }}-tools-${{ github.sha }} restore-keys: | ${{ runner.os }}-tools- - name: Install msys2 - uses: msys2/setup-msys2@v2 + uses: msys2/setup-msys2@d40200dc2db4c351366b048a9565ad82919e1c24 # ratchet:msys2/setup-msys2@v2 with: msystem: MINGW64 update: true install: >- - git - base-devel - mingw-w64-x86_64-toolchain - unzip + git base-devel mingw-w64-x86_64-toolchain unzip - name: Lint run: make lint-code - name: Tidy check @@ -453,26 +447,23 @@ jobs: shell: msys2 {0} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Install msys2 - uses: msys2/setup-msys2@v2 + uses: msys2/setup-msys2@d40200dc2db4c351366b048a9565ad82919e1c24 # ratchet:msys2/setup-msys2@v2 with: msystem: MINGW64 update: true install: >- - git - base-devel - mingw-w64-x86_64-toolchain - unzip + git base-devel mingw-w64-x86_64-toolchain unzip - name: Run unit tests run: ./.github/workflows/scripts/run_unit_tests.sh @@ -489,60 +480,54 @@ jobs: shell: msys2 {0} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Setup go - uses: actions/setup-go@v3 + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # ratchet:actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Load cached deps - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Load cached build tools - uses: actions/cache@v3 + uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d # ratchet:actions/cache@v3 with: path: .build key: ${{ runner.os }}-tools-${{ github.sha }} restore-keys: | ${{ runner.os }}-tools- - name: Install msys2 - uses: msys2/setup-msys2@v2 + uses: msys2/setup-msys2@d40200dc2db4c351366b048a9565ad82919e1c24 # ratchet:msys2/setup-msys2@v2 with: msystem: MINGW64 update: true install: >- - git - base-devel - mingw-w64-x86_64-toolchain - zip - unzip + git base-devel mingw-w64-x86_64-toolchain zip unzip - name: Build artifacts run: ./.github/workflows/scripts/build_artifacts.sh - name: Archive binaries - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # ratchet:actions/upload-artifact@v3 with: name: bin-windows path: ./bin/ - name: Archive artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # ratchet:actions/upload-artifact@v3 with: name: binaries path: ./artifacts/ publish-artifacts: runs-on: ubuntu-20.04 - needs: [lint, unit-test, unit-test-race-detector, artifacts, integration, - lint-windows, unit-test-windows, artifact-windows, integration-windows] - + needs: [lint, unit-test, unit-test-race-detector, artifacts, integration, lint-windows, unit-test-windows, artifact-windows, integration-windows] permissions: contents: read steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Download archived artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # ratchet:actions/download-artifact@v3 with: name: binaries path: ./artifacts/ @@ -568,14 +553,14 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # ratchet:actions/checkout@v3 - name: Download archived images - uses: actions/download-artifact@v3 + uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # ratchet:actions/download-artifact@v3 with: name: images path: . - name: Download archived scratch images - uses: actions/download-artifact@v3 + uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # ratchet:actions/download-artifact@v3 with: name: scratch-images path: . @@ -584,7 +569,7 @@ jobs: - name: Load archived scratch images run: zcat scratch-images.tar.gz | docker load - name: Log in to GCR - uses: docker/login-action@v2 + uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # ratchet:docker/login-action@v2 with: registry: gcr.io username: _json_key @@ -592,7 +577,7 @@ jobs: - name: Push images run: ./.github/workflows/scripts/push-images.sh "${GITHUB_REF}" - name: Log in to GHCR - uses: docker/login-action@v2 + uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # ratchet:docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }}