forked from Azure/AgentBaker
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (33 loc) · 1.43 KB
/
generate-kubelet-flags.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
name: Generate valid kubelet flags per supported k8s version
on:
workflow_dispatch: {}
jobs:
generate-kubelet-flags:
runs-on: ubuntu-latest
steps:
- name: Set up containerd
uses: crazy-max/ghaction-setup-containerd@v2
- uses: actions/checkout@v4
- name: Set up branch for kubelet flag changes
run: |
TIMESTAMP=$(date -d "${{ github.event.head_commit.timestamp }}" +'%Y-%m-%d-%H-%M-%S')
echo "TIMESTAMP=$TIMESTAMP" >> $GITHUB_ENV
git checkout -b kubeletFlags/$TIMESTAMP
- name: Generate valid kubelet flags per supported k8s versions
run: |
make generate-kubelet-flags
- name: Create PR for modified kubelet flag files
run: |
git config --global user.email "[email protected]"
git config --global user.name "alexeldeib"
git remote set-url origin https://alexeldeib:[email protected]/Azure/AgentBaker.git
git add .
git commit -m"feat: generate kubelet flags for supported versions in manifest.json"
git push -u origin kubeletFlags/${{ env.TIMESTAMP }} -f
curl \
-X POST \
https://api.github.com/repos/Azure/AgentBaker/pulls \
-d '{"head" : "'kubeletFlags/${{ env.TIMESTAMP }}'", "base" : "master", "title" : "bump: automated PR for updating kubelet flags files"}' \
-u "alexeldeib:$github_token"
env:
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}