Skip to content

Commit a9fe0e6

Browse files
committed
fix: add scheduled workflow
1 parent f4d5429 commit a9fe0e6

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/scheduled.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Scheduled Trigger for my-branch
2+
3+
on:
4+
schedule:
5+
- cron: '0 12 * * *' # Runs at 12:00 UTC every day
6+
workflow_dispatch: # Allows manual trigger
7+
8+
jobs:
9+
trigger:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
actions: write # Allow triggering workflows
13+
steps:
14+
- name: Install GitHub CLI
15+
run: |
16+
sudo apt update && sudo apt install gh -y
17+
18+
- name: Authenticate GH CLI
19+
run: |
20+
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
21+
22+
- name: Trigger Workflow on my-branch
23+
run: |
24+
gh workflow run MainDistributionPipeline.yml --ref v1.2

0 commit comments

Comments
 (0)