From 15cc2c3d8d359e510163b2eff8926185a2fb3b54 Mon Sep 17 00:00:00 2001 From: Sophia Date: Thu, 23 Jan 2025 16:17:35 -0500 Subject: [PATCH] chore: Update actions artifact versions (v3.x deprecated, using v4.x now) (#2601) * Upload/artifacts uses v4.6.0 instead of deprecated v3.x * Update artifacts download --- .github/actions/build-function/action.yml | 10 ++--- .github/actions/deploy-gcs/action.yml | 2 +- .github/actions/deploy-gfunction/action.yml | 2 +- .github/workflows/centrifuge-app.yml | 2 +- .github/workflows/fabric.yml | 2 +- .github/workflows/prod-deploy.yml | 46 ++++++++++----------- 6 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/actions/build-function/action.yml b/.github/actions/build-function/action.yml index d03bb5cbc7..7f117eff4e 100644 --- a/.github/actions/build-function/action.yml +++ b/.github/actions/build-function/action.yml @@ -3,7 +3,7 @@ description: 'Build a generic function usin yarn build and archiving the results inputs: app_name: - description: "function folder" + description: 'function folder' required: true artifact_name: description: artifact name to upload @@ -34,12 +34,12 @@ runs: working-directory: ${{ inputs.app_name }} shell: sh # env: - # NODE_ENV: production + # NODE_ENV: production # run: ${{ inputs.build_cmd }} run: yarn build - - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce #@3.1.2 - with: + - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 #@4.6.0 + with: name: ${{ inputs.artifact_name || inputs.app_name }} path: ./${{ inputs.app_name }}/dist - if-no-files-found: error \ No newline at end of file + if-no-files-found: error diff --git a/.github/actions/deploy-gcs/action.yml b/.github/actions/deploy-gcs/action.yml index 1d4472c6a1..56ba8598e4 100644 --- a/.github/actions/deploy-gcs/action.yml +++ b/.github/actions/deploy-gcs/action.yml @@ -19,7 +19,7 @@ runs: steps: - name: download webpack id: download - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # @v3.0.2 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # @v4.1.8 with: name: ${{ inputs.artifact_name }} path: webpack diff --git a/.github/actions/deploy-gfunction/action.yml b/.github/actions/deploy-gfunction/action.yml index 8dac1bf6f7..299bd1d33a 100644 --- a/.github/actions/deploy-gfunction/action.yml +++ b/.github/actions/deploy-gfunction/action.yml @@ -92,7 +92,7 @@ runs: - name: retrieve artifacts id: download - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # @v3.0.2 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # @v4.1.8 with: name: ${{ inputs.artifact_name || inputs.app_name }} # This will work only if we're matching the same string as diff --git a/.github/workflows/centrifuge-app.yml b/.github/workflows/centrifuge-app.yml index 4ab0d2fb3a..a356331d0d 100644 --- a/.github/workflows/centrifuge-app.yml +++ b/.github/workflows/centrifuge-app.yml @@ -72,7 +72,7 @@ jobs: cat .env-config/.env.${{ steps.prepare.outputs.env_name }} yarn build:app --mode ${{ steps.prepare.outputs.env_name }} - - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce #@3.1.2 + - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 #@4.6.0 with: name: ${{ env.artifact_name }} path: ./centrifuge-app/build diff --git a/.github/workflows/fabric.yml b/.github/workflows/fabric.yml index 0feceb0f91..62875576f3 100644 --- a/.github/workflows/fabric.yml +++ b/.github/workflows/fabric.yml @@ -38,7 +38,7 @@ jobs: - name: Archive storybook artifacts # if: github.ref === 'refs/heads/main' - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # @v3.1.2 + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # @v4.6.0 with: name: fabric-storybook retention-days: 1 diff --git a/.github/workflows/prod-deploy.yml b/.github/workflows/prod-deploy.yml index 15eb40a995..db0b77b0c0 100644 --- a/.github/workflows/prod-deploy.yml +++ b/.github/workflows/prod-deploy.yml @@ -2,7 +2,7 @@ name: Promote staging to PROD on: release: types: - - released + - released workflow_dispatch: concurrency: group: production-deployment @@ -12,14 +12,14 @@ jobs: sync-staging-prod: permissions: contents: 'read' - id-token: 'write' + id-token: 'write' runs-on: ubuntu-latest environment: production steps: - name: Checkout uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: - path: apps + path: apps - name: prepare env logic id: prepare @@ -36,23 +36,23 @@ jobs: service_account: '${{ secrets.GSA }}' - name: 'Set up Cloud SDK' - uses: google-github-actions/setup-gcloud@62d4898025f6041e16b1068643bfc5a696863587 # @v1 + uses: google-github-actions/setup-gcloud@62d4898025f6041e16b1068643bfc5a696863587 # @v1 - name: Sync webpack from staging run: gsutil -m rsync -d -r gs://app.staging.centrifuge.io gs://${{ steps.prepare.outputs.front_url }} - + retrieve-prod-assets: runs-on: ubuntu-latest - steps: + steps: - name: Download artifact id: download-artifact uses: dawidd6/action-download-artifact@v2 with: workflow: staging-deploy.yml - workflow_conclusion: "" # This will fail if the staging deployment isn't finished yet + workflow_conclusion: '' # This will fail if the staging deployment isn't finished yet # check_artifacts: true # This will search for the last available artifact, useful for testing - # Alternative: download from the release instead of + # Alternative: download from the release instead of # workflow artifacts # - uses: dsaltares/fetch-gh-release-asset@master # with: @@ -77,17 +77,17 @@ jobs: # echo "Workspace PATH: ${{ github.workspace }}" # ls -la $GITHUB_WORKSPACE - - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce #@3.1.2 - with: + - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 #@4.6.0 + with: name: onboarding-api path: ${{ github.workspace }}/onboarding-api-staging/ - if-no-files-found: error - - - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce #@3.1.2 - with: + if-no-files-found: error + + - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 #@4.6.0 + with: name: pinning-api path: ${{ github.workspace }}/pinning-api-staging/ - if-no-files-found: error + if-no-files-found: error pinning-prod-deploy: needs: retrieve-prod-assets @@ -103,7 +103,7 @@ jobs: - name: Checkout uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: - path: apps + path: apps - name: Deploy Gfunction id: functionsdeploy @@ -114,7 +114,7 @@ jobs: GSA: ${{ secrets.GSA }} target: ${{ env.function_handler }} gcloud_region: ${{ vars.GCLOUD_REGION }} - service_account: "${{ vars.PINNING_API_FUNCT_SA }}" + service_account: '${{ vars.PINNING_API_FUNCT_SA }}' deploy_env: production onboarding-prod-deploy: @@ -131,7 +131,7 @@ jobs: - name: Checkout uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: - path: apps + path: apps - name: Deploy Gfunction id: functionsdeploy @@ -141,7 +141,7 @@ jobs: GWIP: ${{ secrets.GWIP }} GSA: ${{ secrets.GSA }} target: ${{ env.function_handler }} - service_account: "${{ vars.ONBOARDING_FUNCT_SA }}" + service_account: '${{ vars.ONBOARDING_FUNCT_SA }}' gcloud_region: ${{ vars.GCLOUD_REGION }} deploy_env: production @@ -156,7 +156,7 @@ jobs: SLACK_MESSAGE: | app.staging.centrifuge.io has been promoted to app.centrifuge.io and is now LIVE! Check out the new release -> https://github.com/centrifuge/apps/releases/ - SLACK_USERNAME: "Centrifuge GHA Bot" - SLACK_ICON: "https://centrifuge.io/favicon.ico" - SLACK_TITLE: "Centrifuge app has been promoted to prod." - SLACK_FOOTER: "Automatic message from centrifuge/apps repository Actions" + SLACK_USERNAME: 'Centrifuge GHA Bot' + SLACK_ICON: 'https://centrifuge.io/favicon.ico' + SLACK_TITLE: 'Centrifuge app has been promoted to prod.' + SLACK_FOOTER: 'Automatic message from centrifuge/apps repository Actions'