build: allow running only mac, lint, or linux (#42504)

build: allow running only mac or linux
This commit is contained in:
Shelley Vohr 2024-06-14 10:08:04 -05:00 committed by GitHub
parent 8650682c5b
commit c1094013eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,12 +8,28 @@ on:
description: 'SHA for electron/build image' description: 'SHA for electron/build image'
default: 'cf814a4d2501e8e843caea071a6b70a48e78b855' default: 'cf814a4d2501e8e843caea071a6b70a48e78b855'
required: true required: true
# push skip-macos:
type: boolean
description: 'Skip macOS builds'
default: false
required: false
skip-linux:
type: boolean
description: 'Skip Linux builds'
default: false
required: false
skip-lint:
type: boolean
description: 'Skip lint check'
default: false
required: false
# push:
# pull_request: # pull_request:
jobs: jobs:
# Lint Jobs # Lint Jobs
lint: lint:
if: ${{ !inputs.skip-lint }}
uses: ./.github/workflows/pipeline-electron-lint.yml uses: ./.github/workflows/pipeline-electron-lint.yml
with: with:
container: '{"image":"ghcr.io/electron/build:${{ inputs.build-image-sha }}","options":"--user root"}' container: '{"image":"ghcr.io/electron/build:${{ inputs.build-image-sha }}","options":"--user root"}'
@ -21,6 +37,7 @@ jobs:
# Checkout Jobs # Checkout Jobs
checkout-macos: checkout-macos:
if: ${{ !inputs.skip-macos }}
runs-on: aks-linux-large runs-on: aks-linux-large
container: container:
image: ghcr.io/electron/build:${{ inputs.build-image-sha }} image: ghcr.io/electron/build:${{ inputs.build-image-sha }}
@ -40,7 +57,9 @@ jobs:
uses: ./src/electron/.github/actions/checkout uses: ./src/electron/.github/actions/checkout
with: with:
generate-sas-token: 'true' generate-sas-token: 'true'
checkout-linux: checkout-linux:
if: ${{ !inputs.skip-linux }}
runs-on: aks-linux-large runs-on: aks-linux-large
container: container:
image: ghcr.io/electron/build:${{ inputs.build-image-sha }} image: ghcr.io/electron/build:${{ inputs.build-image-sha }}