This repository has been archived by the owner on Nov 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 2.06 KB
/
update-schemas.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# yamllint disable rule:comments
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "Update schemas"
'on':
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
render-readme:
name: Update schemas
runs-on: gha-runner-scale-set
steps:
- name: Generate Token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
id: generate-token
with:
app_id: "${{ secrets.BOT_APP_ID }}"
private_key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
# Custom action image doesn't have git, so checkout action will download repo via api,
# which means `.git` will be missing, which means commmit action later in the chain will fail.
# To avoid that, let's install git beforehead.
- name: Install git
run: |
sudo apt-get update && sudo apt-get install --yes --no-install-recommends git
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: "${{ steps.generate-token.outputs.token }}"
- name: Setup Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.11'
cache: 'pip' # caching pip dependencies
- name: Install Requirements
run: |
pip install -r ./.github/scripts/requirements.txt && pip freeze
- name: Setup kubectl
uses: azure/setup-kubectl@3e0aec4d80787158d308d7b364cb1b702e7feb7f # v4.0.0
- name: Refresh schemas
run: |
./.github/scripts/crd-extractor.sh
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
with:
commit_message: "feat: update schemas"
commit_user_name: "RoboDexo2000[bot]"
commit_user_email: "150604236+RoboDexo2000[bot]@users.noreply.github.com"
commit_author: "RoboDexo2000 <150604236+RoboDexo2000[bot]@users.noreply.github.com>"
# yamllint enable rule:comments