Skip to content

Commit 4199504

Browse files
committed
chore(ci): update nightly workflow triggers
* Replace scheduled cron with push-to-`develop` trigger and retain manual dispatch so nightly builds run only on actual branch updates. * Remove the 24-hour change-check job because push-triggered runs make it redundant, simplifying the workflow and reducing CI logic. * Drop unnecessary macOS brew dependency `cmake` to streamline setup steps. * Add environment protection `nightly-release-approval` to require explicit approval before the release job proceeds.
1 parent 6adc8b8 commit 4199504

1 file changed

Lines changed: 5 additions & 34 deletions

File tree

.github/workflows/testing-nightly.yml

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -26,46 +26,16 @@
2626
name: Build Nightly
2727

2828
on:
29-
schedule:
30-
- cron: "0 2 * * *"
29+
push:
30+
branches:
31+
- develop
3132
workflow_dispatch:
3233

3334
env:
3435
BUILD_TYPE: Release
3536
GNUPG_VERSION: "2.5.18"
3637

3738
jobs:
38-
check-changes:
39-
runs-on: ubuntu-latest
40-
outputs:
41-
should_build: ${{ steps.check.outputs.should_build }}
42-
steps:
43-
- uses: actions/checkout@v6
44-
with:
45-
ref: "develop"
46-
fetch-depth: 2
47-
48-
- name: Check for changes in last 24 hours
49-
id: check
50-
env:
51-
GH_TOKEN: ${{ github.token }}
52-
run: |
53-
CURRENT_TIME=$(date -u +%s)
54-
55-
LAST_COMMIT=$(git log -1 --format=%ct)
56-
TIME_DIFF_COMMIT=$((CURRENT_TIME - LAST_COMMIT))
57-
58-
SHOULD_BUILD=false
59-
REASON="No changes in the last 24 hours"
60-
61-
if [ $TIME_DIFF_COMMIT -lt 86400 ]; then
62-
SHOULD_BUILD=true
63-
REASON="Changes found in the last 24 hours"
64-
fi
65-
66-
echo "should_build=${SHOULD_BUILD}" >> $GITHUB_OUTPUT
67-
echo "$REASON"
68-
6939
build:
7040
needs: check-changes
7141
if: needs.check-changes.outputs.should_build == 'true'
@@ -146,7 +116,7 @@ jobs:
146116

147117
- name: Install Dependence (macOS)
148118
run: |
149-
brew install --formula cmake automake texinfo libarchive googletest create-dmg
119+
brew install --formula automake texinfo libarchive googletest create-dmg
150120
if: runner.os == 'macOS'
151121

152122
- name: Set up MinGW (Windows)
@@ -453,6 +423,7 @@ jobs:
453423
release:
454424
needs: build
455425
runs-on: ubuntu-latest
426+
environment: nightly-release-approval
456427
steps:
457428
- uses: actions/checkout@v6
458429
with:

0 commit comments

Comments
 (0)