Skip to content

Versions

Versions #107

Workflow file for this run

name: Versions
on:
schedule:
- cron: '0 1 * * 0'
workflow_dispatch:
# pull_request: # debug
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
jobs:
versions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
- uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.TOKEN_GENERATOR_APP_ID }}
private_key: ${{ secrets.TOKEN_GENERATOR_PRIVATE_KEY }}
id: generate_token
- name: Update versions.json
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
run: |
ruby versions.rb > versions.json
if git diff --exit-code --quiet; then
echo "No changes"
exit
fi
git config user.name github-actions
git config user.email [email protected]
git switch --force-create update-versions
git add versions.json
git commit -m "Update versions.json"
git push --force origin update-versions
gh pr create --base main --head update-versions --title "Update versions.json" --body "" --reviewer a2ikm || true