From 29d105e663fb84afb7ce817504a6672de6c292f1 Mon Sep 17 00:00:00 2001 From: Antoine Cotten Date: Tue, 26 Oct 2021 23:42:44 +0200 Subject: [PATCH] ci(update): Checkout repo after running Node.js steps Ensures the workspace is clean before attempting to update any file. Removes the need for explicitly ignoring Node.js artifacts in Git, since they get cleaned up by the 'checkout' action before fetching. --- .github/workflows/update.yml | 9 +++++---- .gitignore | 3 --- 2 files changed, 5 insertions(+), 7 deletions(-) delete mode 100644 .gitignore diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index c2725e9..ed34252 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -21,10 +21,6 @@ jobs: branch: release-6.x steps: - - uses: actions/checkout@v2 - with: - ref: ${{ matrix.branch }} - - uses: actions/setup-node@v2 - run: npm install semver @@ -59,6 +55,11 @@ jobs: return { version: latestVersion } } + - uses: actions/checkout@v2 + if: steps.get-latest-release.outputs.result + with: + ref: ${{ matrix.branch }} + - name: Update stack version id: update-files if: steps.get-latest-release.outputs.result diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 753765e..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Node.js artifacts created by certain GitHub Actions -/node_modules/ -/package-lock.json