Skip to content

Commit a6487c9

Browse files
authored
Create CompatHelper.yml
1 parent b7564b6 commit a6487c9

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/CompatHelper.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: 0 0 * * *
5+
workflow_dispatch:
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
jobs:
10+
CompatHelper:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check if Julia is already available in the PATH
14+
id: julia_in_path
15+
run: which julia
16+
continue-on-error: true
17+
- name: Install Julia, but only if it is not already available in the PATH
18+
uses: julia-actions/setup-julia@v2
19+
with:
20+
version: '1'
21+
arch: ${{ runner.arch }}
22+
if: steps.julia_in_path.outcome != 'success'
23+
- name: "Install CompatHelper"
24+
run: |
25+
import Pkg
26+
name = "CompatHelper"
27+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
28+
version = "3"
29+
Pkg.add(; name, uuid, version)
30+
shell: julia --color=yes {0}
31+
- name: "Run CompatHelper"
32+
run: |
33+
import CompatHelper
34+
CompatHelper.main()
35+
shell: julia --color=yes {0}
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
# This repo uses Documenter, so we can reuse our [Documenter SSH key](https://documenter.juliadocs.org/stable/man/hosting/walkthrough/).
39+
# If we didn't have one of those setup, we could configure a dedicated ssh deploy key `COMPATHELPER_PRIV` following https://juliaregistries.github.io/CompatHelper.jl/dev/#Creating-SSH-Key.
40+
# Either way, we need an SSH key if we want the PRs that CompatHelper creates to be able to trigger CI workflows themselves.
41+
# That is because GITHUB_TOKEN's can't trigger other workflows (see https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow).
42+
# Check if you have a deploy key setup using these docs: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/reviewing-your-deploy-keys.
43+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
44+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}

0 commit comments

Comments
 (0)