-
Notifications
You must be signed in to change notification settings - Fork 11
55 lines (49 loc) · 2.11 KB
/
UpdatePluto.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Update Pluto version
on:
workflow_dispatch:
inputs:
plutocommitsha:
description: 'Commit SHA or version number'
required: true
default: '3df8390a or 0.19.36'
concurrency:
group: updatepluto
cancel-in-progress: false
jobs:
trigger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# We use that PAT token instead of GITHUB_TOKEN because we are triggering another github action on the commit event.
# Triggering a workflow from a workflow is only allowed if the relaying event is signed with a PAT.
# See https://docs.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token
with:
token: ${{ secrets.PAT_TOKEN }}
- uses: fregante/setup-git-user@v1
- name: Install Julia
uses: julia-actions/setup-julia@v2
with:
# note: this version should match the version in the other actions in this repo
version: "1.11"
- name: Update Pkg environment
run: |
julia -e '
import Pkg
Pkg.activate("pluto-deployment-environment")
Pkg.instantiate()
Pkg.resolve()
Pkg.rm("Pluto")
input = "${{ github.event.inputs.plutocommitsha }}"
if occursin(".", input)
Pkg.add([Pkg.PackageSpec(name="Pluto", version=parse(VersionNumber, input))])
else
Pkg.add([Pkg.PackageSpec(name="Pluto", rev=input)])
end
Pkg.update()
'
- name: Push changes to main
working-directory: pluto-deployment-environment
run: |
git add Project.toml Manifest.toml
git commit -m "$GITHUB_WORKFLOW" -m "Pluto version set to ${{ github.event.inputs.plutocommitsha }}"
git push origin main