mirror of
https://github.com/daeuniverse/dae.git
synced 2025-03-09 04:09:44 +07:00
ci/feat(build,pr-build,seed-build): integrate check runs to report build status (#218)
* ci(build,pr-build,seed-build): integrate check runs * ci(pr-build): use reusable workflow for conclusion stage * fix: fix syntax * fix: fix syntax * fix: fix syntax * ci(pr-build): wrap instantiate-check-runs in pre-actions workflow * ci(pr-build): refactor seed workflow ref * fix: fix syntax * fix: fix syntax * ci(pr-build): inherit secret from org * trigger build * trigger build * fix: fix stage dependency * ci(seed-build): add build-type input * refactor(build): rework main-build logic * patch(pr-build): specify build-type param * fix: fix syntax * patch(seed-build): use string type for build-type * fix: fix syntax * refactor(daily-build): rework workflow logic * chore: pin build workflow to @main * ci: test potential bug fix * chore: ready to be merged * patch/chore(daily-build): update default check-run-id --------- Co-authored-by: dae-bot[bot] <136105375+dae-bot[bot]@users.noreply.github.com>
This commit is contained in:
parent
00b39df677
commit
5e32ffe54d
11
.github/workflows/build.yml
vendored
11
.github/workflows/build.yml
vendored
@ -32,9 +32,20 @@ jobs:
|
||||
repository: ${{ github.repository }}
|
||||
ref: ${{ github.sha }}
|
||||
fetch-depth: 0
|
||||
check-runs: '["build", "main-build-passed"]'
|
||||
secrets: inherit
|
||||
|
||||
build:
|
||||
uses: daeuniverse/dae/.github/workflows/seed-build.yml@main
|
||||
with:
|
||||
ref: ${{ github.sha }}
|
||||
build-type: main-build
|
||||
|
||||
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]/main-build-passed"
|
||||
check-run-conclusion: ${{ needs.build.result }}
|
||||
secrets: inherit
|
||||
|
11
.github/workflows/daily-build.yml
vendored
11
.github/workflows/daily-build.yml
vendored
@ -23,9 +23,20 @@ jobs:
|
||||
repository: ${{ github.repository }}
|
||||
ref: ${{ github.sha }}
|
||||
fetch-depth: 0
|
||||
check-runs: '["build", "daily-build-passed"]'
|
||||
secrets: inherit
|
||||
|
||||
build:
|
||||
uses: daeuniverse/dae/.github/workflows/seed-build.yml@main
|
||||
with:
|
||||
ref: ${{ github.sha }}
|
||||
build-type: daily-build
|
||||
|
||||
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]/daily-build-passed"
|
||||
check-run-conclusion: ${{ needs.build.result }}
|
||||
secrets: inherit
|
||||
|
16
.github/workflows/pr-build.yml
vendored
16
.github/workflows/pr-build.yml
vendored
@ -32,12 +32,24 @@ jobs:
|
||||
repository: ${{ github.repository }}
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
check-runs: '["build", "pr-build-passed"]'
|
||||
secrets: inherit
|
||||
|
||||
build:
|
||||
needs: [pre-actions]
|
||||
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 }}
|
||||
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
|
||||
|
21
.github/workflows/seed-build.yml
vendored
21
.github/workflows/seed-build.yml
vendored
@ -18,13 +18,12 @@ on:
|
||||
type: string
|
||||
required: true
|
||||
default: ${{ github.ref }}
|
||||
pr_build:
|
||||
type: boolean
|
||||
required: false
|
||||
default: false
|
||||
pr_number:
|
||||
pr-number:
|
||||
type: number
|
||||
required: false
|
||||
build-type:
|
||||
type: string
|
||||
description: "[pr-build,main-build,daily-build,release-build]"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -78,9 +77,9 @@ jobs:
|
||||
run: |
|
||||
date=$(git log -1 --format="%cd" --date=short | sed s/-//g)
|
||||
commit=$(echo ${REF} | cut -c1-6)
|
||||
if [[ "${{ inputs.pr_build }}" == "true" ]]; then
|
||||
if [[ "${{ inputs.build-type }}" == "pr-build" ]]; then
|
||||
count=$(git rev-list --count origin/main..HEAD)
|
||||
version="unstable-${date}.pr-${{ inputs.pr_number }}.r${count}.${commit}"
|
||||
version="unstable-${date}.pr-${{ inputs.pr-number }}.r${count}.${commit}"
|
||||
else
|
||||
count=$(git rev-list --count HEAD)
|
||||
version="unstable-${date}.r${count}.${commit}"
|
||||
@ -150,3 +149,11 @@ jobs:
|
||||
with:
|
||||
name: dae-${{ steps.get_filename.outputs.ASSET_NAME }}.zip
|
||||
path: build/*
|
||||
|
||||
- name: Report result
|
||||
uses: daeuniverse/ci-seed-jobs/common/report-check-run@master
|
||||
if: always()
|
||||
with:
|
||||
app_id: ${{ secrets.GH_APP_ID }}
|
||||
private_key: ${{ secrets.GH_APP_PRIVATE_KEY }}
|
||||
id: "dae-bot[bot]/build"
|
||||
|
Loading…
Reference in New Issue
Block a user