From 583d5144d5725a220152af2097fd71335e738825 Mon Sep 17 00:00:00 2001 From: okramarenko Date: Fri, 23 Feb 2024 18:02:56 +0200 Subject: [PATCH 1/5] SCALRCORE-30278: GH Actions: Update deprecated actions --- .github/workflows/default.yml | 16 ++++++++-------- .github/workflows/pr.yml | 18 +++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 5a51db8..c1fd0b3 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -7,8 +7,8 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: "1.18" - name: golangci-lint @@ -29,15 +29,15 @@ jobs: app_id: ${{vars.SUDO_GHA_APP_ID}} installation_id: ${{vars.SUDO_GHA_APP_INSTALLATION_ID}} private_key: ${{secrets.SUDO_GHA_APP_PRIVATE_KEY}} - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: "1.18" - name: Set API_BRANCH run: echo "API_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV - name: Check if same branch exists in fatmouse repository id: check-branch - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{steps.generate_token.outputs.token}} script: | @@ -65,7 +65,7 @@ jobs: } } - name: Clone fatmouse repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: Scalr/fatmouse path: fatmouse @@ -75,11 +75,11 @@ jobs: if: ${{ contains(github.event.head_commit.message, '[DB_BRANCH]') }} run: echo "DB_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV - id: auth - uses: google-github-actions/auth@v0 + uses: google-github-actions/auth@v2 with: credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - name: Set up Cloud SDK - uses: google-github-actions/setup-gcloud@v0 + uses: google-github-actions/setup-gcloud@v2 - name: Copy secrets shell: bash run: | diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index ca9375d..8a5a197 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -34,7 +34,7 @@ jobs: app_id: ${{vars.SUDO_GHA_APP_ID}} installation_id: ${{vars.SUDO_GHA_APP_INSTALLATION_ID}} private_key: ${{secrets.SUDO_GHA_APP_PRIVATE_KEY}} - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Log pr link run: | echo ":taco: Pull request: https://github.com/Scalr/${{ inputs.repo }}/pull/${{ inputs.pr_id }} " >> $GITHUB_STEP_SUMMARY @@ -45,7 +45,7 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} job_name: ${{ github.job }} - name: Set pending status - uses: actions/github-script@v3 + uses: actions/github-script@v7 with: github-token: ${{steps.generate_token.outputs.token}} script: | @@ -58,11 +58,11 @@ jobs: context: 'go-scalr', target_url: '${{ steps.get-job-id.outputs.html_url }}', }) - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: go-version: "1.18" - name: Clone fatmouse repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: Scalr/fatmouse path: fatmouse @@ -80,11 +80,11 @@ jobs: if: ${{ contains(github.event.head_commit.message, '[DB_BRANCH]') }} run: echo "DB_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV - id: auth - uses: google-github-actions/auth@v0 + uses: google-github-actions/auth@v2 with: credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - name: Set up Cloud SDK - uses: google-github-actions/setup-gcloud@v0 + uses: google-github-actions/setup-gcloud@v2 - name: Copy secrets shell: bash run: | @@ -148,7 +148,7 @@ jobs: run: make test - name: Set commit status after tests if: ${{ always() && (steps.run-tests.outcome == 'failure' || steps.run-tests.outcome == 'success') }} - uses: actions/github-script@v3 + uses: actions/github-script@v7 with: github-token: ${{steps.generate_token.outputs.token}} script: | @@ -163,7 +163,7 @@ jobs: }) - name: Set commit status on interrupted workflow if: ${{ always() && steps.run-tests.outcome != 'failure' && steps.run-tests.outcome != 'success' }} - uses: actions/github-script@v3 + uses: actions/github-script@v7 with: github-token: ${{steps.generate_token.outputs.token}} script: | @@ -178,7 +178,7 @@ jobs: }) - name: Add comment on failed tests if: ${{ always() && steps.run-tests.outcome == 'failure' }} - uses: actions/github-script@v5 + uses: actions/github-script@v7 with: script: | const issue_number = ${{ inputs.pr_id }}; From 614b740de2134d094ade23834515005c9245eb38 Mon Sep 17 00:00:00 2001 From: okramarenko Date: Mon, 26 Feb 2024 22:06:29 +0200 Subject: [PATCH 2/5] SCALRCORE-30278: GH Actions: Update deprecated actions --- .github/workflows/pr.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 8a5a197..d91b169 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -49,7 +49,7 @@ jobs: with: github-token: ${{steps.generate_token.outputs.token}} script: | - github.repos.createCommitStatus({ + github.rest.repos.createCommitStatus({ owner: 'Scalr', repo: '${{ inputs.repo }}', sha: '${{ inputs.pr_head_sha }}', @@ -152,7 +152,7 @@ jobs: with: github-token: ${{steps.generate_token.outputs.token}} script: | - github.repos.createCommitStatus({ + github.rest.repos.createCommitStatus({ owner: 'Scalr', repo: '${{ inputs.repo }}', sha: '${{ inputs.pr_head_sha }}', @@ -167,7 +167,7 @@ jobs: with: github-token: ${{steps.generate_token.outputs.token}} script: | - github.repos.createCommitStatus({ + github.rest.repos.createCommitStatus({ owner: 'Scalr', repo: '${{ inputs.repo }}', sha: '${{ inputs.pr_head_sha }}', From 440ece97d9b5e1bfb1d7c67961c2096e43c9566c Mon Sep 17 00:00:00 2001 From: okramarenko Date: Tue, 27 Feb 2024 01:52:55 +0200 Subject: [PATCH 3/5] SCALRCORE-30278: GH Actions: Update deprecated actions --- .github/workflows/default.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index c1fd0b3..f094afe 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -12,7 +12,7 @@ jobs: with: go-version: "1.18" - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v4 with: version: v1.45.2 tests: From 24105a2ab24a267f6fd2bb5d7afcfc381d171ada Mon Sep 17 00:00:00 2001 From: okramarenko Date: Tue, 27 Feb 2024 03:35:41 +0200 Subject: [PATCH 4/5] SCALRCORE-30278: GH Actions: Update deprecated actions --- .github/workflows/default.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index f094afe..8c41cda 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -11,6 +11,7 @@ jobs: - uses: actions/setup-go@v5 with: go-version: "1.18" + cache: false - name: golangci-lint uses: golangci/golangci-lint-action@v4 with: From 795a97412310c632f305349613e69ee145479689 Mon Sep 17 00:00:00 2001 From: okramarenko Date: Wed, 28 Feb 2024 16:52:18 +0200 Subject: [PATCH 5/5] SCALRCORE-30278: GH Actions: Update deprecated actions --- .github/workflows/pr.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index d91b169..9e9b16c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -15,14 +15,14 @@ on: description: Pull request branch base_branch: description: Base branch of pull request -concurrency: - group: ${{ github.ref }}-${{ github.workflow }} - cancel-in-progress: true jobs: tests: runs-on: ubuntu-latest name: tests + concurrency: + group: ${{ github.workflow }}-${{ inputs.pr_id }} + cancel-in-progress: true env: SCALR_TOKEN: ${{ secrets.SCALR_TOKEN }} UPSTREAM_ID: ${{ github.run_number }}