Skip to content

Commit a9c84fd

Browse files
committed
Skip CompatHelper when secret is missing
1 parent 3260911 commit a9c84fd

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/CompatHelper.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ permissions:
99
jobs:
1010
CompatHelper:
1111
runs-on: ubuntu-latest
12+
env:
13+
COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
1214
steps:
1315
- name: Check if Julia is already available in the PATH
1416
id: julia_in_path
@@ -34,11 +36,15 @@ jobs:
3436
version = "3"
3537
Pkg.add(; name, uuid, version)
3638
shell: julia --color=yes {0}
39+
- name: Skip CompatHelper when COMPATHELPER_PRIV is not configured
40+
if: ${{ env.COMPATHELPER_PRIV == '' }}
41+
run: echo "Skipping CompatHelper because the COMPATHELPER_PRIV secret is not configured."
3742
- name: Run CompatHelper
43+
if: ${{ env.COMPATHELPER_PRIV != '' }}
3844
run: |
3945
import CompatHelper
4046
CompatHelper.main()
4147
shell: julia --color=yes {0}
4248
env:
4349
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
50+
COMPATHELPER_PRIV: ${{ env.COMPATHELPER_PRIV }}

0 commit comments

Comments
 (0)