fix: Use labeled event from pull request to trigger apps build (#2930)

This commit is contained in:
Antonis Stamatiou 2023-12-18 09:26:25 +02:00 committed by GitHub
parent 113fda79b1
commit 2154b404f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,11 +1,9 @@
name: build-for-pr
on:
push:
# only for build-pr branches
# build-pr-*
branches:
- build-pr-*
pull_request:
types:
- labeled
defaults:
run:
@ -17,9 +15,12 @@ env:
jobs:
build-linux-for-pr:
runs-on: ubuntu-latest-4-cores
if: ${{ github.event.label.name == 'Build Apps for PR' }}
steps:
- name: ci/checkout-repo
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: ci/setup-node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
@ -49,9 +50,12 @@ jobs:
windows-install-deps:
runs-on: windows-2022
if: ${{ github.event.label.name == 'Build Apps for PR' }}
steps:
- name: ci/checkout-repo
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: ci/setup-node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
@ -76,11 +80,14 @@ jobs:
build-win-for-pr:
runs-on: windows-2022
if: ${{ github.event.label.name == 'Build Apps for PR' }}
needs:
- windows-install-deps
steps:
- name: ci/checkout-repo
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: ci/setup-node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
@ -130,9 +137,12 @@ jobs:
build-mac-for-pr:
runs-on: macos-12
if: ${{ github.event.label.name == 'Build Apps for PR' }}
steps:
- name: ci/checkout-repo
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: ci/setup-node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with: