From 72b311b275a24524c7945488824585def4ab83a1 Mon Sep 17 00:00:00 2001 From: Konstantinos Paparas Date: Fri, 13 Dec 2024 11:36:38 +0100 Subject: [PATCH] ci: update ci configuration --- .github/workflows/ci.yml | 8 +++++++- .github/workflows/codeql-analysis.yml | 2 ++ .github/workflows/deploy-docs.yml | 2 ++ .github/workflows/publish.yml | 10 +++++++--- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad97b46..6cb98e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + persist-credentials: false - name: Setup pnpm uses: pnpm/action-setup@v2 @@ -41,13 +42,18 @@ jobs: - name: Validate PR commits with commitlint if: github.event_name == 'pull_request' - run: pnpm exec commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose + run: pnpm exec commitlint --from "${BASE_SHA}" --to "${HEAD_SHA}" --verbose + env: + BASE_SHA: ${{ github.event.pull_request.base.sha }} + HEAD_SHA: ${{ github.event.pull_request.head.sha }} ci: runs-on: ubuntu-latest steps: - name: Checkout 🛎 uses: actions/checkout@v4 + with: + persist-credentials: false - name: Setup pnpm uses: pnpm/action-setup@v2 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 001855b..a11e292 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -23,6 +23,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + persist-credentials: false - name: Initialize CodeQL uses: github/codeql-action/init@v3 diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index f242e3b..6c3fc97 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -15,6 +15,8 @@ jobs: steps: - name: Checkout 🛎 uses: actions/checkout@v4 + with: + persist-credentials: false - name: Setup pnpm uses: pnpm/action-setup@v2 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1b57c20..4adf325 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,6 +12,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + persist-credentials: false - uses: actions/setup-node@v4 with: @@ -31,6 +32,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + persist-credentials: false - name: Setup pnpm uses: pnpm/action-setup@v2 @@ -48,9 +50,11 @@ jobs: - name: publish to npm run: | - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc - echo "registry=https://registry.npmjs.org/" >> ~/.npmrc - echo "always-auth=true" >> ~/.npmrc + { + echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" + echo "registry=https://registry.npmjs.org/" + echo "always-auth=true" + } >> ~/.npmrc npm whoami pnpm -r publish --access=public --no-git-checks