diff --git a/.github/workflows/action-lint.yml b/.github/workflows/action-lint.yml index 29100930..5fbb5acd 100644 --- a/.github/workflows/action-lint.yml +++ b/.github/workflows/action-lint.yml @@ -1,6 +1,7 @@ name: GitHub Actions linting on: + workflow_dispatch: push: branches: - develop diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index dd971ea1..576bfd60 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -16,5 +16,7 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v4 + with: + persist-credentials: false - name: Build Docker Image run: docker build . diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c62a3e47..8969b353 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,8 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v4 + with: + persist-credentials: false - name: Setup Node.js uses: actions/setup-node@v4 with: diff --git a/.github/workflows/check-changes-to-env.yml b/.github/workflows/check-changes-to-env.yml index 05e608b7..61d982b9 100644 --- a/.github/workflows/check-changes-to-env.yml +++ b/.github/workflows/check-changes-to-env.yml @@ -16,16 +16,19 @@ jobs: - name: Get PR Number id: get-pr-number run: | - PR_NUMBER=$(echo "${{ github.ref }}" | awk 'BEGIN { FS = "/" } ; { print $3 }') - echo "pr-number=${PR_NUMBER}" >> $GITHUB_OUTPUT + PR_NUMBER=$(echo "${GITHUB_REF}" | awk 'BEGIN { FS = "/" } ; { print $3 }') + echo "pr-number=${PR_NUMBER}" >> "$GITHUB_OUTPUT" - name: Comment when dummy.txt changes uses: actions/github-script@v7 + env: + PR_NUMBER: ${{ steps.get-pr-number.outputs.pr-number }} + REPO: ${{ github.repository }} with: script: | const filename = ".env.example" const filenameSha256 = await sha256(filename) - const diffURL = "https://github.com/${{ github.repository }}/pull/${{ steps.get-pr-number.outputs.pr-number }}/files#diff-" + filenameSha256 - const docsURL = "https://github.com/${{ github.repository }}/wiki/Setting-Environment-Variables" + const diffURL = `https://github.com/${process.env.REPO}/pull/${process.env.PR_NUMBER}/files#diff-${filenameSha256}` + const docsURL = `https://github.com/${process.env.REPO}/wiki/Setting-Environment-Variables` const commentBody = `⚠️ It looks like [${filename}](${diffURL}) has changed. Remember to update the [Setting Environment Variables](${docsURL}) article accordingly.` const listComments = await github.rest.issues.listComments({ ...context.repo, diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1deeb759..e886f3ca 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,7 +14,10 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout Repository + uses: actions/checkout@v4 + with: + persist-credentials: false - name: Install modules run: npm install - name: Run ESLint diff --git a/.github/workflows/run-unit-tests.yml b/.github/workflows/run-unit-tests.yml index a0e6fbf2..fe7438e9 100644 --- a/.github/workflows/run-unit-tests.yml +++ b/.github/workflows/run-unit-tests.yml @@ -16,6 +16,8 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v4 + with: + persist-credentials: false - name: Setup Node.js uses: actions/setup-node@v4 with: diff --git a/.github/workflows/test-sql-queries.yml b/.github/workflows/test-sql-queries.yml index 0973d12d..43311d92 100644 --- a/.github/workflows/test-sql-queries.yml +++ b/.github/workflows/test-sql-queries.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest services: postgres: - image: postgres:latest + image: postgres:17.5 ports: - 5432:5432 options: >- @@ -28,6 +28,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + persist-credentials: false - name: Wait for PostgreSQL to be ready run: | until pg_isready -h localhost -p 5432; do