Skip to content

Commit 519bfc6

Browse files
authored
Merge pull request #1548 from Anselmoo/fix/weekly-2
ci: 💚 Add repository_dispatch event to GitHub Actions workflows
2 parents e5d1ee7 + d31985e commit 519bfc6

File tree

4 files changed

+27
-5
lines changed

4 files changed

+27
-5
lines changed

.github/workflows/codeql.yml

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ on:
1919
branches: ["main"]
2020
schedule:
2121
- cron: "40 19 * * 5"
22+
repository_dispatch:
23+
types: [create-pull-request]
24+
2225

2326
jobs:
2427
analyze:

.github/workflows/docker-ci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
branches: [main]
55
pull_request:
66
branches: [main, develop]
7+
repository_dispatch:
8+
types: [create-pull-request]
9+
710

811
jobs:
912
docker:

.github/workflows/python-ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches: [main, feature/*, release/*, hotfix/*]
66
pull_request:
77
branches: [main, develop]
8+
repository_dispatch:
9+
types: [create-pull-request]
810

911
jobs:
1012
pre-commit:

.github/workflows/weekly-poetry-bot.yml

+19-5
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,22 @@ jobs:
7575
env:
7676
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7777

78-
# - name: Merge Pull Request via gh
79-
# run: |
80-
# gh pr merge update-dependencies-${{ env.DATE }} --merge --auto
81-
# env:
82-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
- name: Add Label to Pull Request
79+
run: |
80+
pr_number=$(gh pr view --json number --jq '.number')
81+
gh pr edit $pr_number --add-label "weekly-update"
82+
env:
83+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
84+
85+
- name: Wait for required checks
86+
run: |
87+
pr_number=$(gh pr view --json number --jq '.number')
88+
gh pr checks --wait $pr_number
89+
env:
90+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91+
92+
- name: Merge Pull Request via gh
93+
run: |
94+
gh pr merge update-dependencies-${{ env.DATE }} --merge --auto
95+
env:
96+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)