Skip to content

Commit 95c56b7

Browse files
authored
Update format_pr.yml
1 parent b9cefa9 commit 95c56b7

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

.github/workflows/format_pr.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,29 @@
11
name: format-pr
2-
32
on:
43
schedule:
54
- cron: '0 0 * * *'
65
jobs:
76
build:
8-
runs-on: ${{ matrix.os }}
9-
strategy:
10-
matrix:
11-
julia-version: [1.8]
12-
julia-arch: [x86]
13-
os: [ubuntu-latest]
7+
runs-on: ubuntu-latest
148
steps:
15-
- uses: julia-actions/setup-julia@latest
16-
with:
17-
version: ${{ matrix.julia-version }}
18-
199
- uses: actions/checkout@v2
2010
- name: Install JuliaFormatter and format
2111
run: |
22-
julia -e 'import Pkg; Pkg.add("JuliaFormatter")'
12+
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
2313
julia -e 'using JuliaFormatter; format(".")'
2414
# https://github.com/marketplace/actions/create-pull-request
15+
# https://github.com/peter-evans/create-pull-request#reference-example
2516
- name: Create Pull Request
26-
uses: peter-evans/create-pull-request@v2
27-
env:
28-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
17+
id: cpr
18+
uses: peter-evans/create-pull-request@v3
2919
with:
3020
token: ${{ secrets.GITHUB_TOKEN }}
3121
commit-message: Format .jl files
3222
title: 'Automatic JuliaFormatter.jl run'
3323
branch: auto-juliaformatter-pr
24+
delete-branch: true
3425
labels: formatting, automated pr, no changelog
3526
- name: Check outputs
3627
run: |
37-
echo 'Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}'
38-
echo 'Pull Request Number - ${{ steps.cpr.outputs.pr_number }}'
28+
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
29+
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

0 commit comments

Comments
 (0)