mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-08-16 12:49:14 +00:00
* ci: trigger standalone build when PR labeled with build-artifact Signed-off-by: Andy Lee <andy.lee@suse.com> * ci: skip upload gate for PR-triggered standalone builds Signed-off-by: Andy Lee <andy.lee@suse.com> --------- Signed-off-by: Andy Lee <andy.lee@suse.com>
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
name: Build Standalone on PR Merge
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- 'release-harvester-v*'
|
|
- '*-dev'
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- 'release-harvester-v*'
|
|
- '*-dev'
|
|
types:
|
|
- merged
|
|
- labeled
|
|
|
|
jobs:
|
|
build-validation:
|
|
name: Build Test
|
|
# allow triggering when a PR is labeled with "build-artifact"
|
|
if: >-
|
|
github.event_name != 'pull_request' ||
|
|
github.event.action != 'labeled' ||
|
|
github.event.label.name == 'build-artifact'
|
|
uses: ./.github/workflows/run-lint.yaml
|
|
build:
|
|
name: Build and Upload Package
|
|
if: >-
|
|
github.event_name != 'pull_request' ||
|
|
github.event.action != 'labeled' ||
|
|
github.event.label.name == 'build-artifact'
|
|
uses: ./.github/workflows/build-and-publish-standalone.yaml
|
|
needs:
|
|
- build-validation
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
id-token: write
|
|
with:
|
|
# For PR-triggered runs github.ref_name is "<prNumber>/merge" (not a real
|
|
# branch), which breaks the upload gate. Leave CI_BRANCH empty for PRs so
|
|
# the gate is skipped; use the real branch name for push events.
|
|
CI_BRANCH: ${{ github.event_name == 'pull_request' && '' || github.ref_name }}
|