Skip to content

Commit 5c93708

Browse files
authored
Update CompatHelper.yml
Signed-off-by: abhro <[email protected]>
1 parent f87c593 commit 5c93708

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

.github/workflows/CompatHelper.yml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,44 @@
11
name: CompatHelper
2+
23
on:
34
schedule:
45
- cron: 0 0 * * *
56
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
612
jobs:
713
CompatHelper:
814
runs-on: ubuntu-latest
915
steps:
10-
- name: Pkg.add("CompatHelper")
11-
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12-
- name: CompatHelper.main()
16+
- name: Check if Julia is already available in the PATH
17+
id: julia_in_path
18+
run: which julia
19+
continue-on-error: true
20+
- name: Install Julia, but only if it is not already available in the PATH
21+
if: steps.julia_in_path.outcome != 'success'
22+
uses: julia-actions/setup-julia@v2
23+
with:
24+
version: '1'
25+
arch: ${{ runner.arch }}
26+
- name: Add the General registry via Git
27+
shell: julia --color=yes {0}
28+
run: import Pkg; Pkg.Registry.add("General")
29+
env:
30+
JULIA_PKG_SERVER: ""
31+
- name: Install CompatHelper
32+
shell: julia --color=yes {0}
33+
run: |
34+
import Pkg
35+
name = "CompatHelper"
36+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
37+
version = "3"
38+
Pkg.add(; name, uuid, version)
39+
- name: Run CompatHelper
40+
shell: julia --color=yes {0}
41+
run: import CompatHelper; CompatHelper.main()
1342
env:
1443
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1544
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
16-
run: julia -e 'using CompatHelper; CompatHelper.main()'

0 commit comments

Comments
 (0)