From 8a91015769f37938272ec5bd4aedc6ad004171a2 Mon Sep 17 00:00:00 2001 From: Jose Storopoli Date: Wed, 17 Jul 2024 17:40:07 -0300 Subject: [PATCH] ci: harden zip command with -n from the man unzip: -n stands for never overwrite existing files. If a file already exists, skip the extraction of that file without prompting. --- .github/workflows/semver-checks-pr-label.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/semver-checks-pr-label.yml b/.github/workflows/semver-checks-pr-label.yml index 2cbfffd64..cab9b65f5 100644 --- a/.github/workflows/semver-checks-pr-label.yml +++ b/.github/workflows/semver-checks-pr-label.yml @@ -50,7 +50,7 @@ jobs: fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/semver-break.zip`, Buffer.from(download.data)); - name: "Unzip artifact" if: ${{ hashFiles('semver-break.zip') != '' }} - run: unzip semver-break.zip + run: unzip -n semver-break.zip - name: "Comment and add label on PR - Semver break" uses: actions/github-script@v7 if: ${{ hashFiles('semver-break') != '' }}