Files
EasyTier/.github/workflows/nightly.yml
T
KKRainbow 15a3d43039 ci: wait for nightly builds before publishing the release (#2695)
GITHUB_TOKEN-dispatched builds do not trigger downstream workflow_run
jobs. The nightly release check ran before builds finished and then
exited successfully without publishing anything.

Track dispatch run IDs and wait for all missing components to succeed.
Retry failed jobs once, account for delayed rerun state, and fail on
terminal errors. Bound the build and wait job to three hours.

Pass the built commit to publication so later main commits do not
change the release target. Retain component deduplication and manual
build completion handlers, and document the nightly lifecycle.

Add regression coverage for pending builds, retries, terminal failures,
dispatch races, and main advancing before publication. All 34 Node tests
and actionlint for the three nightly workflows pass.
2026-10-14 09:57:54 +08:00

43 lines
974 B
YAML

name: EasyTier Nightly
on:
schedule:
# 03:17 Asia/Shanghai; avoid the busy start of the hour.
- cron: '17 19 * * *'
workflow_dispatch:
concurrency:
group: easytier-nightly
cancel-in-progress: false
permissions:
actions: write
contents: read
jobs:
dispatch:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 180
outputs:
sha: ${{ steps.build.outputs.sha }}
steps:
- uses: actions/checkout@v5
- name: Build main and wait for successful results
id: build
uses: actions/github-script@v8
with:
script: |
const dispatch = require('./.github/scripts/nightly-build.js');
core.setOutput('sha', await dispatch({ github, context, core }));
release:
needs: dispatch
permissions:
actions: read
contents: write
uses: ./.github/workflows/nightly-release.yml
with:
sha: ${{ needs.dispatch.outputs.sha }}