From ff11326f6e343231f48afa746005d58e34b241bf Mon Sep 17 00:00:00 2001 From: mendezr Date: Mon, 14 Sep 2026 19:08:43 +0000 Subject: [PATCH 1/2] Add CI check for BLUEFIN_DISCUSSIONS_TOKEN Signed-off-by: mendezr --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..d9152ad4f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1 @@ +name: CI\non:\n push:\n branches: [main]\n pull_request:\n branches: [main]\n\njobs:\n build:\n runs-on: ubuntu-latest\n\n steps:\n - uses: actions/checkout@v3\n - name: Set up Node.js\n uses: actions/setup-node@v3\n with:\n node-version: 18\n - run: npm install\n - run: npm test\n - name: Check for BLUEFIN_DISCUSSIONS_TOKEN\n run: |\n if [ -z "${{ secrets.BLUEFIN_DISCUSSIONS_TOKEN }}" ]; then\n echo "BLUEFIN_DISCUSSIONS_TOKEN is not configured" >&2\n exit 1\n fi From d656586a624a7c982b5d17f38a4d8e436854f8f4 Mon Sep 17 00:00:00 2001 From: mendezr Date: Sun, 20 Sep 2026 09:09:46 +0000 Subject: [PATCH 2/2] fix(ci): make BLUEFIN_DISCUSSIONS_TOKEN check valid and fork-safe The workflow file was a single line of literal \n escapes that GitHub Actions could not parse. Rewrite it as real multi-line YAML, align the setup with the repo's test.yml actions (harden-runner, npm ci, node 24), and gate the secret check to non-pull_request events so fork PRs that never receive secrets are not failed. The secret is passed via env rather than interpolated at parse time. Assisted-by: Claude Opus 4 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/ci.yml | 47 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9152ad4f..75c36a73e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1 +1,46 @@ -name: CI\non:\n push:\n branches: [main]\n pull_request:\n branches: [main]\n\njobs:\n build:\n runs-on: ubuntu-latest\n\n steps:\n - uses: actions/checkout@v3\n - name: Set up Node.js\n uses: actions/setup-node@v3\n with:\n node-version: 18\n - run: npm install\n - run: npm test\n - name: Check for BLUEFIN_DISCUSSIONS_TOKEN\n run: |\n if [ -z "${{ secrets.BLUEFIN_DISCUSSIONS_TOKEN }}" ]; then\n echo "BLUEFIN_DISCUSSIONS_TOKEN is not configured" >&2\n exit 1\n fi +name: CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Harden Runner + uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 + with: + egress-policy: audit + + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Set up Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: 24 + cache: npm + + - name: Install dependencies + run: npm ci --legacy-peer-deps + + - name: Run tests + run: npm test + + - name: Check for BLUEFIN_DISCUSSIONS_TOKEN + if: github.event_name != 'pull_request' + env: + BLUEFIN_DISCUSSIONS_TOKEN: ${{ secrets.BLUEFIN_DISCUSSIONS_TOKEN }} + run: | + if [ -z "$BLUEFIN_DISCUSSIONS_TOKEN" ]; then + echo "BLUEFIN_DISCUSSIONS_TOKEN is not configured" >&2 + exit 1 + fi \ No newline at end of file