Skip to content

Update spec files

Update spec files #410

Workflow file for this run

name: Update spec files
on:
workflow_dispatch:
schedule:
# Runs at 12:00am UTC -> 5:00pm PDT
- cron: "0 0 * * *"
permissions:
# Needs to write to this repo
contents: write
jobs:
update:
name: update
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6
with:
python-version: "3.14" # Need python version for cache
cache: "pip" # caching pip dependencies
- name: Cache GraphQL API IDs
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: specs/graphql_id_cache.json
# This key is overkill - we realy only need to update the
# cache when a *new* spec file is added, not when *any* spec
# file changes. However, this seems to be the easiest way
# to achieve that from within Actions.
key: graphql-ids-${{ hashFiles('specs/*.spec') }}
# Make sure even if the specs change it grabs the old cache
# to start from! Entries are never invalidated, only added
restore-keys: graphql-ids
- name: Install dependencies
run: pip install -r requirements.txt
- name: Set git user to github-actions[bot]
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Check and update spec files
run: python -m autocopr.autocopr --verbose --in-place --push specs
env:
GITHUB_TOKEN: ${{ secrets.KUBEARCHITECTBOT_TOKEN || secrets.GITHUB_TOKEN }}