Skip to content

Commit abf3e10

Browse files
authored
Merge pull request #67 from FluxML/ap/patch
Update Workflows
2 parents b9cefa9 + e2190ae commit abf3e10

File tree

2 files changed

+13
-20
lines changed

2 files changed

+13
-20
lines changed

.github/workflows/TagBot.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
name: TagBot
22
on:
3-
schedule:
4-
- cron: 0 * * * *
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
57
jobs:
68
TagBot:
9+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
710
runs-on: ubuntu-latest
811
steps:
912
- uses: JuliaRegistries/TagBot@v1
1013
with:
1114
token: ${{ secrets.GITHUB_TOKEN }}
1215
ssh: ${{ secrets.DOCUMENTER_KEY }}
13-

.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)