Auto-update versions #248
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
name: Auto-update versions | |
on: | |
schedule: | |
- cron: 0 0 1/7 * * | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check if Julia is already available in the PATH | |
id: julia_in_path | |
run: which julia | |
continue-on-error: true | |
- name: Install Julia, but only if it is not already available in the PATH | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: '1' | |
arch: ${{ runner.arch }} | |
if: steps.julia_in_path.outcome != 'success' | |
- name: Install JSON3 and run script | |
run: | | |
julia -e 'import Pkg; Pkg.add("JSON3")' | |
julia .github/update-versions.jl | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: ":robot: Auto-update Julia versions" | |
title: '[AUTO] Update Julia versions' | |
branch: auto-update-versions | |
delete-branch: true | |
labels: update, automated pr, no changelog | |
- name: Check outputs | |
run: | | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |