-
Notifications
You must be signed in to change notification settings - Fork 14
executable file
·45 lines (42 loc) · 1.28 KB
/
update-pre-release-branches.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Auto-update pre-release branches
on:
push:
branches:
- main
pull_request:
paths:
- .github/workflows/update-pre-release-branches.yaml
schedule:
- cron: "0 0 * * *" # Runs every midnight
permissions:
contents: read
jobs:
update-branches:
permissions:
contents: write # for Git to git push
runs-on: ubuntu-latest
outputs:
preRelease: ${{ steps.determine.outputs.preRelease }}
branch: ${{ steps.determine.outputs.branch }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.BOT_SSH_KEY }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Python dependencies
run: pip3 install packaging requests
- name: Define git credentials
run: |
# Needed to create commits.
git config --global user.name "Github Actions"
git config --global user.email "[email protected]"
- name: 'Prepare pre-release git branch'
run: |
python3 ./build-scripts/k8s_release.py prepare_prerelease_git_branch
- name: Clean obsolete branches
run: |
python3 ./build-scripts/k8s_release.py clean_obsolete_git_branches