dae/.github/workflows/pr-build.yml
Kevin Yu f5fce5cba7
ci(pr-build): don't trigger workflow for draft PRs (#215)
* ci(pr-build): dont't trigger workflow for draft PRs

* trigger build
2023-07-14 11:43:56 +08:00

44 lines
1.3 KiB
YAML

# _
# __| | __ _ ___
# / _` |/ _` |/ _ \
# | (_| | (_| | __/
# \__,_|\__,_|\___|
#
# Copyright (C) 2023 @daeuniverse <https://github.com/daeuniverse>
#
# This is a open-source software, liscensed under the AGPL-3.0 License.
# See /License for more information.
name: PR Build (Preview)
run-name: "#${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }} @${{ github.event.pull_request.head.ref }}:${{ github.event.pull_request.head.sha }}"
on:
pull_request:
types: [ opened, synchronize, reopened ]
paths:
- "**/*.go"
- "**/*.c"
- "**/*.h"
- "go.mod"
- "go.sum"
- ".github/workflows/pr-build.yml"
- ".github/workflows/seed-build.yml"
jobs:
pre-actions:
if: ${{ github.event.pull_request.draft == false }}
uses: daeuniverse/ci-seed-jobs/.github/workflows/pre-actions.yml@master
with:
repository: ${{ github.repository }}
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
secrets: inherit
build:
if: ${{ github.event.pull_request.draft == false }}
uses: daeuniverse/dae/.github/workflows/seed-build.yml@main
with:
ref: ${{ github.event.pull_request.head.sha }}
pr_build: true
pr_number: ${{ github.event.pull_request.number }}