Skip to content

format-pr

format-pr #860

Workflow file for this run

name: format-pr
# Taken from https://github.com/julia-actions/julia-format
on:
schedule:
- cron: "0 0 * * *"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: [1]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- name: "Cache dependencies"
uses: julia-actions/cache@v2
- name: "Install JuliaFormatter and format"
run: |
julia -e 'import Pkg; Pkg.add("JuliaFormatter")'
julia -e 'using JuliaFormatter; format(".")'
- name: "Create Pull Request"
id: cpr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Format .jl files
title: "Automatic JuliaFormatter.jl run"
branch: auto-juliaformatter-pr
delete-branch: true
labels: formatting, 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 }}"