From 56de33c8212393b598e2730b1ce65c520ad6ed35 Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Mon, 31 Jan 2022 09:59:36 +0530 Subject: [PATCH] Use specific and latest version in actions --- .github/workflows/build-pull-request.yml | 8 ++++---- .github/workflows/deploy-pull-request.yml | 4 ++-- .github/workflows/netlify-dev.yaml | 5 +++-- .github/workflows/netlify-prod.yaml | 5 +++-- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml index a1b7037b..31edf0c2 100644 --- a/.github/workflows/build-pull-request.yml +++ b/.github/workflows/build-pull-request.yml @@ -10,22 +10,22 @@ jobs: env: PR_NUMBER: ${{github.event.number}} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2.4.0 - name: Build run: npm ci && npm run build - name: Upload Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v2.3.1 with: name: previewbuild path: dist retention-days: 1 - - uses: actions/github-script@v3.1.0 + - uses: actions/github-script@v5.1.0 with: script: | var fs = require('fs'); fs.writeFileSync('${{github.workspace}}/pr.json', JSON.stringify(context.payload.pull_request)); - name: Upload PR Info - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v2.3.1 with: name: pr.json path: pr.json diff --git a/.github/workflows/deploy-pull-request.yml b/.github/workflows/deploy-pull-request.yml index 86c5de4f..6c176bc5 100644 --- a/.github/workflows/deploy-pull-request.yml +++ b/.github/workflows/deploy-pull-request.yml @@ -14,7 +14,7 @@ jobs: # workflow_run action (https://github.com/actions/download-artifact/issues/60) # so instead we get this mess: - name: 'Download artifact' - uses: actions/github-script@v3.1.0 + uses: actions/github-script@v5.1.0 with: script: | var artifacts = await github.actions.listWorkflowRunArtifacts({ @@ -56,7 +56,7 @@ jobs: console.log(`::set-output name=prnumber::${pr.number}`); - name: Deploy to Netlify id: netlify - uses: nwtgck/actions-netlify@v1.2 + uses: nwtgck/actions-netlify@v1.2.3 with: publish-dir: dist deploy-message: "Deploy from GitHub Actions" diff --git a/.github/workflows/netlify-dev.yaml b/.github/workflows/netlify-dev.yaml index 2289eca2..d961102d 100644 --- a/.github/workflows/netlify-dev.yaml +++ b/.github/workflows/netlify-dev.yaml @@ -11,9 +11,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - uses: jsmrcaga/action-netlify-deploy@9cc40dcd499dd1511b3cc99912444f8970411cc6 + - uses: actions/checkout@v2.4.0 + - uses: jsmrcaga/action-netlify-deploy@v1.7.2 with: + install_command: "npm ci" NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE2_ID }} BUILD_DIRECTORY: "dist" diff --git a/.github/workflows/netlify-prod.yaml b/.github/workflows/netlify-prod.yaml index b8c3c27d..150f1729 100644 --- a/.github/workflows/netlify-prod.yaml +++ b/.github/workflows/netlify-prod.yaml @@ -10,9 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - uses: jsmrcaga/action-netlify-deploy@9cc40dcd499dd1511b3cc99912444f8970411cc6 + - uses: actions/checkout@v2.4.0 + - uses: jsmrcaga/action-netlify-deploy@v1.7.2 with: + install_command: "npm ci" NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} BUILD_DIRECTORY: "dist"