Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.

Commit 67f7197

Browse files
authored
Create format_pr.yml
1 parent c11a56d commit 67f7197

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/format_pr.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: format-pr
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
jobs:
7+
build:
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
julia-version: [1.3.0]
12+
julia-arch: [x86]
13+
os: [ubuntu-latest]
14+
steps:
15+
- uses: julia-actions/setup-julia@latest
16+
with:
17+
version: ${{ matrix.julia-version }}
18+
19+
- uses: actions/checkout@v2
20+
- name: Install JuliaFormatter and format
21+
run: |
22+
julia -e 'import Pkg; Pkg.add("JuliaFormatter")'
23+
julia -e 'using JuliaFormatter; format(".";verbose=true, always_for_in=true)'
24+
25+
# https://github.com/marketplace/actions/create-pull-request
26+
- name: Create Pull Request
27+
uses: peter-evans/create-pull-request@v2
28+
with:
29+
token: ${{ secrets.GITHUB_TOKEN }}
30+
commit-message: Format .jl files
31+
title: 'Automatic JuliaFormatter.jl run'
32+
branch: auto-juliaformatter-pr
33+
labels: formatting, automated pr, no changelog
34+
- name: Check outputs
35+
run: |
36+
echo 'Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}'
37+
echo 'Pull Request Number - ${{ steps.cpr.outputs.pr_number }}'

0 commit comments

Comments
 (0)