This repository has been archived by the owner on Nov 2, 2024. It is now read-only.
Update schemas #939
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |