Skip to content
This repository has been archived by the owner on Dec 18, 2021. It is now read-only.

Commit

Permalink
Create format-pr.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger-luo committed Dec 8, 2019
1 parent cbce322 commit 9666408
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/format-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: format-pr

on:
# schedule:
# - cron: '0 0 * * *'
schedule:
- cron: '05,17,29,41,53 * * * *'

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: [1.3.0]
julia-arch: [x86]
os: [ubuntu-latest]
steps:
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}

- uses: actions/checkout@v1
- name: Install JuliaFormatter and format
run: |
julia -e 'import Pkg; Pkg.add("JuliaFormatter")'
julia -e 'using JuliaFormatter; format(".", always_for_in=true, margin = 102)'
# https://github.com/marketplace/actions/create-pull-request
- name: Create Pull Request
uses: peter-evans/create-pull-request@v1.9.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Format .jl files
title: '[AUTO] Format .jl files'
branch: create-pull-request/format-pr
labels: formatting, automated pr, no changelog
- name: Check outputs
run: |
echo 'Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}'
echo 'Pull Request Number - ${{ steps.cpr.outputs.pr_number }}'

0 comments on commit 9666408

Please sign in to comment.