From db16fd3e54cde5bc4707a29ffcba9f21625ab7ef Mon Sep 17 00:00:00 2001 From: Josh Vlk Date: Fri, 18 Sep 2026 09:34:34 -0400 Subject: [PATCH] ci(actions): remove deprecated runtime warnings Upgrade JavaScript actions to Node.js 24-compatible releases and pin hosted runners to Ubuntu 24.04. Pass branch names through the step environment so deployment scripts do not interpolate untrusted context directly. --- .github/workflows/clear-ok-to-deploy.yml | 2 +- .github/workflows/deploy-fork-preview.yml | 4 ++-- .github/workflows/deploy.yml | 24 ++++++++++++------- .github/workflows/pull-request.yml | 12 +++++----- .../workflows/update-visual-screenshots.yml | 2 +- 5 files changed, 25 insertions(+), 19 deletions(-) diff --git a/.github/workflows/clear-ok-to-deploy.yml b/.github/workflows/clear-ok-to-deploy.yml index 58056ff3b..c040d3aa5 100644 --- a/.github/workflows/clear-ok-to-deploy.yml +++ b/.github/workflows/clear-ok-to-deploy.yml @@ -5,7 +5,7 @@ on: jobs: clear-label: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: pull-requests: write steps: diff --git a/.github/workflows/deploy-fork-preview.yml b/.github/workflows/deploy-fork-preview.yml index cfd8179d2..4deedc2c1 100644 --- a/.github/workflows/deploy-fork-preview.yml +++ b/.github/workflows/deploy-fork-preview.yml @@ -10,7 +10,7 @@ on: jobs: deploy-fork: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: ${{ github.event_name == 'workflow_dispatch' || github.event.label.name == 'ok-to-deploy' }} permissions: contents: read @@ -78,7 +78,7 @@ jobs: - name: Deploy id: deploy - uses: cloudflare/wrangler-action@v3 + uses: cloudflare/wrangler-action@v4 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0d5e4c6cb..a503ab1e5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,7 +13,7 @@ on: jobs: deploy: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 name: Deploy if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false }} permissions: @@ -37,8 +37,10 @@ jobs: run: yarn build:sync-bundles - name: Set VITE_DEPLOYMENT_URL shell: bash + env: + RAW_BRANCH_INPUT: ${{ github.head_ref || github.ref_name }} run: | - RAW_BRANCH="${{ github.head_ref || github.ref_name }}" + RAW_BRANCH="$RAW_BRANCH_INPUT" if [[ "$RAW_BRANCH" == "master" ]]; then echo "VITE_DEPLOYMENT_URL=" >> "$GITHUB_ENV" @@ -59,7 +61,7 @@ jobs: - name: Deploy if: ${{ github.actor != 'dependabot[bot]' }} id: deploy - uses: cloudflare/wrangler-action@v3 + uses: cloudflare/wrangler-action@v4 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} @@ -71,14 +73,14 @@ jobs: FORCE_COLOR: 0 - name: Comment with docs preview link if: ${{ github.event_name == 'pull_request' && steps.deploy.outcome == 'success' }} - uses: marocchino/sticky-pull-request-comment@v2 + uses: marocchino/sticky-pull-request-comment@v3 with: recreate: true header: docs-deployment message: | [Docs preview](${{ steps.deploy.outputs.deployment-url }}) deploy-guide: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 name: Deploy Guide Worker if: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) && github.actor != 'dependabot[bot]' }} permissions: @@ -101,8 +103,10 @@ jobs: run: yarn build:guide - name: Set guide deployment command shell: bash + env: + RAW_BRANCH_INPUT: ${{ github.head_ref || github.ref_name }} run: | - RAW_BRANCH="${{ github.head_ref || github.ref_name }}" + RAW_BRANCH="$RAW_BRANCH_INPUT" SAFE_BRANCH=$(echo "$RAW_BRANCH" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9-]+/-/g; s/^-+//; s/-+$//; s/-+/-/g') SAFE_BRANCH="${SAFE_BRANCH:0:28}" @@ -117,7 +121,7 @@ jobs: fi - name: Deploy guide id: deploy-guide - uses: cloudflare/wrangler-action@v3 + uses: cloudflare/wrangler-action@v4 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} @@ -162,7 +166,7 @@ jobs: GUIDE_PRODUCTION_ENVIRONMENT: ${{ env.GUIDE_PRODUCTION_ENVIRONMENT }} e2e: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 name: E2E Tests needs: deploy if: ${{ github.actor != 'dependabot[bot]' }} @@ -184,8 +188,10 @@ jobs: - name: Set Cypress base URL id: cypress-base-url shell: bash + env: + RAW_BRANCH_INPUT: ${{ github.head_ref || github.ref_name }} run: | - RAW_BRANCH="${{ github.head_ref || github.ref_name }}" + RAW_BRANCH="$RAW_BRANCH_INPUT" if [[ "$RAW_BRANCH" == "master" ]]; then CYPRESS_BASE_URL="https://rescript-lang.org" diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 248ccb3dc..f52d16dfa 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -2,7 +2,7 @@ name: Pull Request on: [pull_request] jobs: Format: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v6.0.2 @@ -20,7 +20,7 @@ jobs: - name: Format check run: yarn ci:format Site_Checks: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v6.0.2 @@ -40,7 +40,7 @@ jobs: # Confirms that Wrangler can start the Docs Pages and Guide local dev servers. # This startup check intentionally excludes route-level application and Pages Function behavior. Wrangler: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v6.0.2 @@ -92,7 +92,7 @@ jobs: cat wrangler.log exit 1 Vitest: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 container: # Keep this image tag aligned with package.json's playwright version. image: mcr.microsoft.com/playwright:v1.63.0-noble @@ -120,7 +120,7 @@ jobs: - name: Guide Vitest run: yarn workspace @rescript-lang/guide ci:test Visual_Regression: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 container: # Keep this image tag aligned with package.json's playwright version. image: mcr.microsoft.com/playwright:v1.63.0-noble @@ -144,7 +144,7 @@ jobs: run: yarn ci:test:visual - name: Upload visual regression artifacts if: failure() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: visual-regression-artifacts path: | diff --git a/.github/workflows/update-visual-screenshots.yml b/.github/workflows/update-visual-screenshots.yml index ea8f8ec0b..9b1c3e5ed 100644 --- a/.github/workflows/update-visual-screenshots.yml +++ b/.github/workflows/update-visual-screenshots.yml @@ -7,7 +7,7 @@ permissions: jobs: Update_Visual_Screenshots: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 container: # Keep this image tag aligned with package.json's playwright version. image: mcr.microsoft.com/playwright:v1.63.0-noble