From bfdffc1d29fc26f35368419d278e575f7ef9e568 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Fri, 27 Sep 2024 11:46:43 -0400 Subject: [PATCH] MNT: Use hash for Action workflow versions and update if needed --- .github/workflows/ci.yaml | 6 +++--- .github/workflows/deploy.yaml | 16 ++++++++-------- .github/workflows/testdeploy.yaml | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f546dad..60ef85b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,19 +11,19 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: Read .nvmrc id: node_version run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) - name: Set up node - uses: actions/setup-node@v2 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: ${{ steps.node_version.outputs.NODE_VERSION }} - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: ~/.npm key: ${{ runner.os }}-node-${{ steps.node_version.outputs.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }} diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 3908cb9..42ca96a 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -13,19 +13,19 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: Read .nvmrc id: node_version run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) - name: Set up node - uses: actions/setup-node@v2 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: ${{ steps.node_version.outputs.NODE_VERSION }} - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: ~/.npm key: ${{ runner.os }}-node-${{ steps.node_version.outputs.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }} @@ -39,7 +39,7 @@ jobs: name: Build - name: Upload gatsby artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: gatsby-build path: ./public @@ -49,10 +49,10 @@ jobs: needs: build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: python-version: 3.9 @@ -62,7 +62,7 @@ jobs: python -m pip install -r deployment/requirements.txt - name: Download gatsby artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: gatsby-build path: ./public @@ -86,7 +86,7 @@ jobs: python deployment/installtutorials.py --dest public/tutorials - name: Deploy to gh-pages - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./public diff --git a/.github/workflows/testdeploy.yaml b/.github/workflows/testdeploy.yaml index 67aa9d3..25a1ff0 100644 --- a/.github/workflows/testdeploy.yaml +++ b/.github/workflows/testdeploy.yaml @@ -8,10 +8,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: python-version: 3.9