From 8d1b1da27dce65d182799148b52c036fde95b777 Mon Sep 17 00:00:00 2001 From: hatz Date: Tue, 10 Sep 2024 13:39:20 -0500 Subject: [PATCH] Migrate to shared-actions `v2` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > [!IMPORTANT] > **Please thoroughly review this PR before approving and merging** > This migration is complicated and may require some manual changes. Below we will call out breaking changes and other important notes. This PR moves all workflows to the new shared-actions v2. Please check out the following docs for more information on this migration: - [Migration Guide](https://docs.devops.figure.com/shared-actions/v2-migration-guide) - [Migration Changes](https://docs.devops.figure.com/shared-actions/v2-migration-changes) Please reach out to [#github-actions-help](https://figure-group.slack.com/archives/C044W9BRAVD) with any and all questions, someone from devops or core tech will be able to help. --- ### Notes - Once you've merged in this PR and are running `v2` actions it is worth watching your workflows for warnings about inputs that are no longer used. We are able to handle a lot of replacements automatically, but we err on the side of caution to avoid breaking other github actions that we don't own. These warnings won't ever break your builds, but it is good practice to keep them clean. - Some other common upgrades are also done in this PR, like updating other `actions/` to their latest versions. 🤖🪄 This PR was automatically created by a magic script. --- .github/workflows/docker.yml | 8 ++++---- .github/workflows/lint.yml | 4 ++-- .github/workflows/test.yml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e73a583..f5ce03d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -19,7 +19,7 @@ jobs: with: fetch-depth: 0 - name: Setup go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: 1.18 - name: Go mod vendor @@ -47,17 +47,17 @@ jobs: echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ') - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Available platforms run: echo ${{ steps.buildx.outputs.platforms }} - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ github.event_name != 'pull_request' }} with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Publish to Docker Hub - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . target: run diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0ae05b3..44509a7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 6 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6.1.2 with: PATTERNS: | @@ -24,5 +24,5 @@ jobs: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. version: v1.52.2 args: --timeout 10m - github-token: ${{ secrets.github_token }} + github-token: ${{ secrets. if: env.GIT_DIFF diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f49d194..8bc282d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: - name: Checkout uses: actions/checkout@master - name: Setup go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: 1.18 - name: Go mod vendor