Skip to content

Commit 9fb070b

Browse files
committed
Update sync local branches workflows
- Automatically sync upstream master branch and all tags at 05:00 UTC, only on Saturday - Automatically update mamolinux/stable branch when there is new tag at 06:00 UTC, only on Saturday
1 parent 66aee18 commit 9fb070b

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Sync Local Branches
2+
3+
on:
4+
schedule:
5+
# Schedule for Sync Upstream: Every Saturday at 5:00 UTC
6+
- cron: '0 5 * * 6'
7+
# Schedule for Update Stable Branch: Every Saturday at 6:00 UTC
8+
- cron: '0 6 * * 6'
9+
10+
workflow_dispatch:
11+
inputs:
12+
action:
13+
description: 'Select the action to run'
14+
required: true
15+
type: choice
16+
options:
17+
- Sync Upstream
18+
- Update Stable Branch
19+
- Run All
20+
21+
jobs:
22+
# This job handles the Upstream Sync, whether from a schedule or manual trigger
23+
upstream_sync_job:
24+
if: |
25+
(github.event_name == 'schedule' && github.event.schedule == '0 5 * * 6') ||
26+
(github.event_name == 'workflow_dispatch' && github.event.inputs.action == 'Sync Upstream') ||
27+
(github.event_name == 'workflow_dispatch' && github.event.inputs.action == 'Run All')
28+
uses: mamolinux/github-actions/.github/workflows/sync-with-upstream.yml@main
29+
with:
30+
upstream: 'linuxmint/xed'
31+
target_branch: 'master'
32+
33+
# This job handles the Stable Branch Update, whether from a schedule or manual trigger
34+
stable_update_job:
35+
if: |
36+
(github.event_name == 'schedule' && github.event.schedule == '0 6 * * 6') ||
37+
(github.event_name == 'workflow_dispatch' && github.event.inputs.action == 'Update Stable Branch') ||
38+
(github.event_name == 'workflow_dispatch' && github.event.inputs.action == 'Run All')
39+
uses: mamolinux/github-actions/.github/workflows/update-stable-branch.yml@main
40+
with:
41+
target_branch: 'mamolinux/stable'
42+
needs: upstream_sync_job

0 commit comments

Comments
 (0)