From 58252a4bd867309a01c3597704eb6ebb2aea50fe Mon Sep 17 00:00:00 2001 From: Konstantinos Paparas Date: Fri, 13 Dec 2024 18:31:35 +0100 Subject: [PATCH] ci: update ci configuration --- .github/workflows/ci.yml | 13 ++++++++++--- .github/workflows/codeql.yml | 2 ++ .github/workflows/release.yml | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 88d44099..b2506723 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,11 +19,15 @@ concurrency: jobs: commit-lint: runs-on: ubuntu-latest + env: + BASE_SHA: ${{ github.event.pull_request.base.sha }} + HEAD_SHA: ${{ github.event.pull_request.head.sha }} steps: - name: Checkout 🛎 uses: actions/checkout@v4 with: fetch-depth: 0 + persist-credentials: false - name: Setup node env 🏗 uses: actions/setup-node@v4 @@ -37,7 +41,7 @@ jobs: id: pnpm-cache shell: bash run: | - echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + echo "STORE_PATH=$(pnpm store path)" >> "$GITHUB_OUTPUT" - name: Setup pnpm cache uses: actions/cache@v4 @@ -58,13 +62,15 @@ 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 ci: runs-on: ubuntu-latest steps: - name: Checkout 🛎 uses: actions/checkout@v4 + with: + persist-credentials: false - name: Setup node env 🏗 uses: actions/setup-node@v4 @@ -78,7 +84,7 @@ jobs: id: pnpm-cache shell: bash run: | - echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + echo "STORE_PATH=$(pnpm store path)" >> "$GITHUB_OUTPUT" - name: Setup pnpm cache uses: actions/cache@v4 @@ -136,6 +142,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + persist-credentials: false - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build docker image diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 97334eb7..71e080d0 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -18,6 +18,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/release.yml b/.github/workflows/release.yml index 7b1ac2fa..0b50f3d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + persist-credentials: false - uses: actions/setup-node@v4 with: