2023-07-09 19:57:16 +07:00
|
|
|
# _
|
|
|
|
# __| | __ _ ___
|
|
|
|
# / _` |/ _` |/ _ \
|
|
|
|
# | (_| | (_| | __/
|
|
|
|
# \__,_|\__,_|\___|
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2023-07-08 20:31:43 +07:00
|
|
|
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:
|
2023-07-19 21:14:07 +07:00
|
|
|
types: [ opened, synchronize, reopened, ready_for_review ]
|
2023-07-08 20:31:43 +07:00
|
|
|
paths:
|
|
|
|
- "**/*.go"
|
|
|
|
- "**/*.c"
|
|
|
|
- "**/*.h"
|
|
|
|
- "go.mod"
|
|
|
|
- "go.sum"
|
2023-07-09 19:57:16 +07:00
|
|
|
- ".github/workflows/pr-build.yml"
|
2023-07-13 20:01:31 +07:00
|
|
|
- ".github/workflows/seed-build.yml"
|
2023-07-08 20:31:43 +07:00
|
|
|
|
|
|
|
jobs:
|
2023-07-09 19:57:16 +07:00
|
|
|
pre-actions:
|
2023-07-14 10:43:56 +07:00
|
|
|
if: ${{ github.event.pull_request.draft == false }}
|
2023-07-09 19:57:16 +07:00
|
|
|
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
|
2023-07-16 12:07:10 +07:00
|
|
|
check-runs: '["build", "pr-build-passed"]'
|
2023-07-09 19:57:16 +07:00
|
|
|
secrets: inherit
|
2023-07-08 20:31:43 +07:00
|
|
|
|
|
|
|
build:
|
2023-07-16 12:07:10 +07:00
|
|
|
needs: [pre-actions]
|
2023-07-14 10:43:56 +07:00
|
|
|
if: ${{ github.event.pull_request.draft == false }}
|
2023-07-13 20:12:39 +07:00
|
|
|
uses: daeuniverse/dae/.github/workflows/seed-build.yml@main
|
2023-07-13 18:05:26 +07:00
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
2023-07-16 12:07:10 +07:00
|
|
|
pr-number: ${{ github.event.pull_request.number }}
|
|
|
|
build-type: pr-build
|
|
|
|
secrets: inherit
|
|
|
|
|
|
|
|
post-actions:
|
|
|
|
if: always()
|
|
|
|
needs: [build]
|
|
|
|
uses: daeuniverse/ci-seed-jobs/.github/workflows/dae-post-actions.yml@master
|
|
|
|
with:
|
|
|
|
check-run-id: "dae-bot[bot]/pr-build-passed"
|
|
|
|
check-run-conclusion: ${{ needs.build.result }}
|
|
|
|
secrets: inherit
|