fix: disable local windows signing for forks PR

Resolves https://github.com/arduino/arduino-ide/issues/2545
This commit is contained in:
Giacomo Cusinato 2024-11-07 16:50:05 +02:00
parent 3ccc864453
commit 63e9dfd7f5
2 changed files with 6 additions and 1 deletions

View File

@ -286,6 +286,8 @@ jobs:
SIGNTOOL_PATH: "C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x86/signtool.exe"
WIN_CERT_PASSWORD: ${{ secrets.INSTALLER_CERT_WINDOWS_PASSWORD }}
WIN_CERT_CONTAINER_NAME: ${{ secrets.INSTALLER_CERT_WINDOWS_CONTAINER }}
WIN_SIGNING_ENABLED: ${{ !github.event.pull_request.head.repo.fork }}
strategy:
matrix:
config: ${{ fromJson(needs.select-targets.outputs.build-matrix) }}

View File

@ -1,7 +1,10 @@
const childProcess = require('child_process');
exports.default = async function (configuration) {
if (!process.env.GITHUB_ACTIONS) {
if (
!process.env.GITHUB_ACTIONS ||
process.env.WIN_SIGNING_ENABLED !== 'true'
) {
return;
}