Skip to content

Update k3s-versions.json #457

Update k3s-versions.json

Update k3s-versions.json #457

Workflow file for this run

name: Update k3s-versions.json
on:
schedule:
- cron: '43 8 * * *'
workflow_dispatch: {}
permissions:
contents: write
pull-requests: write
jobs:
check-for-token:
outputs:
has-token: ${{ steps.calc.outputs.HAS_SECRET }}
runs-on: ubuntu-latest
steps:
- id: calc
run: echo "HAS_SECRET=${HAS_SECRET}" >> "${GITHUB_OUTPUT}"
env:
HAS_SECRET: ${{ secrets.RUN_WORKFLOW_FROM_WORKFLOW != '' }}
check-update-versions:
needs: check-for-token
if: needs.check-for-token.outputs.has-token == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
# we may need to checkout an existing branch, so need the full history
fetch-depth: 0
# Setup go to be able to run `go run ./scripts/k3s-version.go`
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.work
- run: ./scripts/k3s-versions.sh
env:
GITHUB_TOKEN: ${{ secrets.RUN_WORKFLOW_FROM_WORKFLOW }}