-
Notifications
You must be signed in to change notification settings - Fork 12
70 lines (62 loc) · 2.07 KB
/
ManifestUpdater.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: ManifestUpdater
on:
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:
jobs:
ManifestUpdater:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get Julia compatibility
id: julia_compat
# NOTE: this requires a Julia compat lower-bound with minor version!
run : |
version=$(grep '^julia = ' Project.toml | grep -o '".*"' | cut -d '"' -f2)
echo "::set-output name=version::$version"
- uses: julia-actions/setup-julia@v1
with:
version: ${{ steps.julia_compat.outputs.version }}
- name: Update packages
id: pkg_update
run: |
log=$(julia --project -e 'using Pkg; Pkg.update()')
log="${log//'%'/'%25'}"
log="${log//$'\n'/'%0A'}"
log="${log//$'\r'/'%0D'}"
echo "::set-output name=log::$log"
- name: Get status
id: pkg_status
run: |
log=$(julia --project -e 'using Pkg; VERSION >= v"1.3" ? Pkg.status(diff=true) : Pkg.status()')
log="${log//'%'/'%25'}"
log="${log//$'\n'/'%0A'}"
log="${log//$'\r'/'%0D'}"
echo "::set-output name=log::$log"
- name: Get Julia version
id: version
run: |
log=$(julia -e "println(Base.VERSION)")
echo "::set-output name=log::$log"
- name: Create pull request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: |
Update dependencies.
${{ steps.pkg_status.outputs.log }}
title: Update manifest
reviewers: maleadt
body: |
This pull request updates the manifest for Julia v${{ steps.version.outputs.log }}:
```
${{ steps.pkg_status.outputs.log }}
```
<details><summary>Click here for the full update log.</summary>
<p>
```
${{ steps.pkg_update.outputs.log }}
```
</p>
</details>
branch: update_manifest