Skip to content

Commit d74cce1

Browse files
committed
feat: improved workflows
1 parent 0e651dc commit d74cce1

13 files changed

Lines changed: 2140 additions & 700 deletions

.github/workflows/auto-merge-on-approval.yml

Lines changed: 172 additions & 133 deletions
Large diffs are not rendered by default.

.github/workflows/clean-runner-cache.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,40 @@
1010

1111
name: clean-runner-cache
1212

13+
# ————————————————————————————————————————————————————————————————
14+
# Trigger Configuration
15+
# ————————————————————————————————————————————————————————————————
1316
on:
1417
pull_request:
1518
types: [ closed ]
1619

17-
# Cancel older runs of the same PR if a new commit is pushed
20+
# ————————————————————————————————————————————————————————————————
21+
# Permissions
22+
# ————————————————————————————————————————————————————————————————
23+
permissions: read-all
24+
25+
# ————————————————————————————————————————————————————————————————
26+
# Concurrency Control
27+
# ————————————————————————————————————————————————————————————————
1828
concurrency:
1929
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
2030
cancel-in-progress: true
2131

22-
permissions: read-all
23-
2432
jobs:
2533
cleanup:
2634
runs-on: ubuntu-latest
2735
permissions:
2836
actions: read
2937
steps:
30-
## Install GitHub CLI for cache management
38+
# ————————————————————————————————————————————————————————————————
39+
# Install GitHub CLI and Cleanup Caches
40+
# ————————————————————————————————————————————————————————————————
3141
- name: Install GitHub CLI
3242
run: sudo apt-get update && sudo apt-get install -y gh
3343

34-
## Fetch the list of cache keys and delete them
44+
# ————————————————————————————————————————————————————————————————
45+
# Fetch the list of cache keys and delete them
46+
# ————————————————————————————————————————————————————————————————
3547
- name: Cleanup caches
3648
run: |
3749
echo "Fetching list of cache keys"

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ on:
1111
pull_request:
1212
# The branches below must be a subset of the branches above
1313
branches: [ master ]
14-
# schedule:
15-
# - cron: '0 23 * * 0'
14+
schedule:
15+
- cron: '0 8 * * 1' # Every Monday at 08:00 UTC
1616

1717
permissions:
1818
contents: read

.github/workflows/delete-merged-branches.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,26 @@
1010

1111
name: delete-merged-branches
1212

13+
# ————————————————————————————————————————————————————————————————
14+
# Trigger Configuration
15+
# ————————————————————————————————————————————————————————————————
1316
on:
1417
pull_request:
1518
types: [ closed ]
1619

17-
# Cancel older runs of the same PR if a new commit is pushed
20+
# ————————————————————————————————————————————————————————————————
21+
# Permissions
22+
# ————————————————————————————————————————————————————————————————
23+
permissions:
24+
contents: read
25+
26+
# ————————————————————————————————————————————————————————————————
27+
# Concurrency Control
28+
# ————————————————————————————————————————————————————————————————
1829
concurrency:
1930
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
2031
cancel-in-progress: true
2132

22-
permissions:
23-
contents: read
24-
2533
jobs:
2634
cleanup:
2735
runs-on: ubuntu-latest
@@ -30,7 +38,9 @@ jobs:
3038
# Only run if the PR was merged
3139
if: github.event.pull_request.merged == true
3240
steps:
33-
# Step 1: Use github-script to run custom JS for branch deletion
41+
# ————————————————————————————————————————————————————————————————
42+
# Delete Merged Branch
43+
# ————————————————————————————————————————————————————————————————
3444
- name: Delete branch
3545
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
3646
with:

0 commit comments

Comments
 (0)