From d1762ad818ccb06a83975f5c9f4ec5f8588bef48 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Wed, 22 Jul 2026 00:25:49 +0800 Subject: [PATCH] CI: use `env` instead of `matrix` for variable --- .github/workflows/main.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 55dea999..9a92fb93 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -164,10 +164,8 @@ jobs: name: Deploy if: github.ref == 'refs/heads/master' runs-on: ubuntu-slim - # matrix is a tricky way to define a variable directly in the action yaml - strategy: - matrix: - wranglerVersion: ["3.114.17"] + env: + WRANGLER_VERSION: "3.114.17" steps: - name: Get NPM cache directory path id: npm_cache_path @@ -178,7 +176,7 @@ jobs: path: | ${{ steps.npm_cache_path.outputs.dir }} node_modules - key: deploy-to-cloudflare-npm-${{ runner.os }}-${{ runner.arch }}-wrangler-${{ matrix.wranglerVersion }} + key: deploy-to-cloudflare-npm-${{ runner.os }}-${{ runner.arch }}-wrangler-${{ env.WRANGLER_VERSION }} restore-keys: | deploy-to-cloudflare-npm-${{ runner.os }}-${{ runner.arch }}-wrangler- - uses: actions/download-artifact@v8 @@ -203,7 +201,7 @@ jobs: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} command: pages deploy public --project-name=sukkaw-ruleset --commit-dirty=true --branch=main - wranglerVersion: ${{ matrix.wranglerVersion }} + wranglerVersion: ${{ env.WRANGLER_VERSION }} - name: Upload Dist to GitLab id: deploy_gitlab background: true