name: Update Kn components in hack/ scripts

permissions:
  contents: write
  pull-requests: write

on:
  schedule:
  # every 4 hours
  - cron: '0 */4 * * *'
jobs:
  update:
    name: Update components
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-go@v5
      with:
        go-version: 1.23.0
    - name: Run script
      env:
        GITHUB_TOKEN: ${{ github.token }}
      run: make wf-generate-kn-components

