Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Commit

Permalink
Update format_pr.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
norci authored Dec 21, 2020
1 parent 762f032 commit ed1b398
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions .github/workflows/format_pr.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,29 @@
name: format-pr

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

- uses: actions/checkout@v2
- name: Install JuliaFormatter and format
run: |
julia -e 'import Pkg; Pkg.add("JuliaFormatter")'
julia -e 'using JuliaFormatter; format(".";verbose=true, always_for_in=true)'
julia -e 'using JuliaFormatter; format(".")'
# https://github.com/marketplace/actions/create-pull-request
# https://github.com/peter-evans/create-pull-request#reference-example
- name: Create Pull Request
uses: peter-evans/create-pull-request@v2
id: cpr
uses: peter-evans/create-pull-request@v3
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 - ${{ env.PULL_REQUEST_NUMBER }}'
echo 'Pull Request Number - ${{ steps.cpr.outputs.pr_number }}'
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

0 comments on commit ed1b398

Please sign in to comment.