From d11ecc5a7a134ce313ab6cc664a776f1ddc068f0 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 25 Nov 2025 22:37:48 +0800 Subject: update ci --- .github/workflows/archlinux.yml | 8 ++++++-- .github/workflows/dragonflybsd.yml | 8 ++++++-- .github/workflows/fedora.yml | 8 ++++++-- .github/workflows/linux_luajit.yml | 8 ++++++-- .github/workflows/netbsd.yml | 8 ++++++-- .github/workflows/openbsd.yml | 8 ++++++-- .github/workflows/windows_luajit.yml | 8 ++++++-- 7 files changed, 42 insertions(+), 14 deletions(-) diff --git a/.github/workflows/archlinux.yml b/.github/workflows/archlinux.yml index 1c87e03b3..7ee73fe47 100644 --- a/.github/workflows/archlinux.yml +++ b/.github/workflows/archlinux.yml @@ -17,9 +17,12 @@ jobs: uses: actions/github-script@v7 with: script: | + const fs = require('fs'); + const outputFile = process.env.GITHUB_OUTPUT; + // Always run for release events if (context.eventName === 'release') { - core.setOutput('should-run', true); + fs.appendFileSync(outputFile, `should-run=true\n`); core.info('Release event detected. Will run tests.'); return; } @@ -41,7 +44,8 @@ jobs: const random = Math.abs(hash) / 2147483647; const shouldRun = random < probability; - core.setOutput('should-run', shouldRun); + // Use environment file instead of deprecated set-output + fs.appendFileSync(outputFile, `should-run=${shouldRun}\n`); if (shouldRun) { core.info(`Random check passed (${(random * 100).toFixed(2)}% < ${(probability * 100).toFixed(0)}%). Will run tests.`); } else { diff --git a/.github/workflows/dragonflybsd.yml b/.github/workflows/dragonflybsd.yml index 53ed7a02e..0a7730bb1 100644 --- a/.github/workflows/dragonflybsd.yml +++ b/.github/workflows/dragonflybsd.yml @@ -17,9 +17,12 @@ jobs: uses: actions/github-script@v7 with: script: | + const fs = require('fs'); + const outputFile = process.env.GITHUB_OUTPUT; + // Always run for release events if (context.eventName === 'release') { - core.setOutput('should-run', true); + fs.appendFileSync(outputFile, `should-run=true\n`); core.info('Release event detected. Will run tests.'); return; } @@ -41,7 +44,8 @@ jobs: const random = Math.abs(hash) / 2147483647; const shouldRun = random < probability; - core.setOutput('should-run', shouldRun); + // Use environment file instead of deprecated set-output + fs.appendFileSync(outputFile, `should-run=${shouldRun}\n`); if (shouldRun) { core.info(`Random check passed (${(random * 100).toFixed(2)}% < ${(probability * 100).toFixed(0)}%). Will run tests.`); } else { diff --git a/.github/workflows/fedora.yml b/.github/workflows/fedora.yml index 3b6a66ba7..1b0ec0304 100644 --- a/.github/workflows/fedora.yml +++ b/.github/workflows/fedora.yml @@ -17,9 +17,12 @@ jobs: uses: actions/github-script@v7 with: script: | + const fs = require('fs'); + const outputFile = process.env.GITHUB_OUTPUT; + // Always run for release events if (context.eventName === 'release') { - core.setOutput('should-run', true); + fs.appendFileSync(outputFile, `should-run=true\n`); core.info('Release event detected. Will run tests.'); return; } @@ -41,7 +44,8 @@ jobs: const random = Math.abs(hash) / 2147483647; const shouldRun = random < probability; - core.setOutput('should-run', shouldRun); + // Use environment file instead of deprecated set-output + fs.appendFileSync(outputFile, `should-run=${shouldRun}\n`); if (shouldRun) { core.info(`Random check passed (${(random * 100).toFixed(2)}% < ${(probability * 100).toFixed(0)}%). Will run tests.`); } else { diff --git a/.github/workflows/linux_luajit.yml b/.github/workflows/linux_luajit.yml index 8d47c9093..36c519245 100644 --- a/.github/workflows/linux_luajit.yml +++ b/.github/workflows/linux_luajit.yml @@ -17,9 +17,12 @@ jobs: uses: actions/github-script@v7 with: script: | + const fs = require('fs'); + const outputFile = process.env.GITHUB_OUTPUT; + // Always run for release events if (context.eventName === 'release') { - core.setOutput('should-run', true); + fs.appendFileSync(outputFile, `should-run=true\n`); core.info('Release event detected. Will run tests.'); return; } @@ -41,7 +44,8 @@ jobs: const random = Math.abs(hash) / 2147483647; const shouldRun = random < probability; - core.setOutput('should-run', shouldRun); + // Use environment file instead of deprecated set-output + fs.appendFileSync(outputFile, `should-run=${shouldRun}\n`); if (shouldRun) { core.info(`Random check passed (${(random * 100).toFixed(2)}% < ${(probability * 100).toFixed(0)}%). Will run tests.`); } else { diff --git a/.github/workflows/netbsd.yml b/.github/workflows/netbsd.yml index 6d1bbd163..f944387d4 100644 --- a/.github/workflows/netbsd.yml +++ b/.github/workflows/netbsd.yml @@ -17,9 +17,12 @@ jobs: uses: actions/github-script@v7 with: script: | + const fs = require('fs'); + const outputFile = process.env.GITHUB_OUTPUT; + // Always run for release events if (context.eventName === 'release') { - core.setOutput('should-run', true); + fs.appendFileSync(outputFile, `should-run=true\n`); core.info('Release event detected. Will run tests.'); return; } @@ -41,7 +44,8 @@ jobs: const random = Math.abs(hash) / 2147483647; const shouldRun = random < probability; - core.setOutput('should-run', shouldRun); + // Use environment file instead of deprecated set-output + fs.appendFileSync(outputFile, `should-run=${shouldRun}\n`); if (shouldRun) { core.info(`Random check passed (${(random * 100).toFixed(2)}% < ${(probability * 100).toFixed(0)}%). Will run tests.`); } else { diff --git a/.github/workflows/openbsd.yml b/.github/workflows/openbsd.yml index a0314e7ef..1e3cc912a 100644 --- a/.github/workflows/openbsd.yml +++ b/.github/workflows/openbsd.yml @@ -17,9 +17,12 @@ jobs: uses: actions/github-script@v7 with: script: | + const fs = require('fs'); + const outputFile = process.env.GITHUB_OUTPUT; + // Always run for release events if (context.eventName === 'release') { - core.setOutput('should-run', true); + fs.appendFileSync(outputFile, `should-run=true\n`); core.info('Release event detected. Will run tests.'); return; } @@ -41,7 +44,8 @@ jobs: const random = Math.abs(hash) / 2147483647; const shouldRun = random < probability; - core.setOutput('should-run', shouldRun); + // Use environment file instead of deprecated set-output + fs.appendFileSync(outputFile, `should-run=${shouldRun}\n`); if (shouldRun) { core.info(`Random check passed (${(random * 100).toFixed(2)}% < ${(probability * 100).toFixed(0)}%). Will run tests.`); } else { diff --git a/.github/workflows/windows_luajit.yml b/.github/workflows/windows_luajit.yml index 3d2ad1292..4c9d4966f 100644 --- a/.github/workflows/windows_luajit.yml +++ b/.github/workflows/windows_luajit.yml @@ -17,9 +17,12 @@ jobs: uses: actions/github-script@v7 with: script: | + const fs = require('fs'); + const outputFile = process.env.GITHUB_OUTPUT; + // Always run for release events if (context.eventName === 'release') { - core.setOutput('should-run', true); + fs.appendFileSync(outputFile, `should-run=true\n`); core.info('Release event detected. Will run tests.'); return; } @@ -41,7 +44,8 @@ jobs: const random = Math.abs(hash) / 2147483647; const shouldRun = random < probability; - core.setOutput('should-run', shouldRun); + // Use environment file instead of deprecated set-output + fs.appendFileSync(outputFile, `should-run=${shouldRun}\n`); if (shouldRun) { core.info(`Random check passed (${(random * 100).toFixed(2)}% < ${(probability * 100).toFixed(0)}%). Will run tests.`); } else { -- cgit v1.3.1