Skip to content

Commit 44b9ec2

Browse files
committed
Add GitHub action to update the manifest. [ci skip]
1 parent c73ab42 commit 44b9ec2

File tree

2 files changed

+69
-1
lines changed

2 files changed

+69
-1
lines changed

.github/workflows/update_manifest.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: update_manifest
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 1'
6+
7+
jobs:
8+
update_manifest:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Get Julia compatibility
13+
id: julia_compat
14+
# NOTE: this requires a julia compat lower-bound with minor version!
15+
run : |
16+
version=$(grep '^julia = ' Project.toml | grep -o '".*"' | cut -d '"' -f2)
17+
echo "::set-output name=version::$version"
18+
- uses: julia-actions/setup-julia@latest
19+
with:
20+
version: ${{ steps.julia_compat.outputs.version }}
21+
- name: Update packages
22+
id: pkg_update
23+
run: |
24+
log=$(julia --project -e 'using Pkg; Pkg.update()')
25+
log="${log//'%'/'%25'}"
26+
log="${log//$'\n'/'%0A'}"
27+
log="${log//$'\r'/'%0D'}"
28+
echo "::set-output name=log::$log"
29+
- name: Get status
30+
id: pkg_status
31+
run: |
32+
log=$(julia --project -e 'using Pkg; VERSION >= v"1.3" ? Pkg.status(diff=true) : Pkg.status()')
33+
log="${log//'%'/'%25'}"
34+
log="${log//$'\n'/'%0A'}"
35+
log="${log//$'\r'/'%0D'}"
36+
echo "::set-output name=log::$log"
37+
- name: Get Julia version
38+
id: version
39+
run: |
40+
log=$(julia -e "println(Base.VERSION)")
41+
echo "::set-output name=log::$log"
42+
- name: Create pull request
43+
uses: peter-evans/create-pull-request@v2
44+
with:
45+
token: ${{ secrets.GITHUB_TOKEN }}
46+
commit-message: |
47+
Update dependencies.
48+
${{ steps.status.outputs.log }}
49+
title: Update manifest
50+
reviewers: maleadt
51+
body: |
52+
This pull request updates the manifest for Julia v${{ steps.version.outputs.log }}:
53+
54+
```
55+
${{ steps.pkg_status.outputs.log }}
56+
```
57+
58+
<details><summary>Click here for the full update log.</summary>
59+
<p>
60+
61+
```
62+
${{ steps.pkg_update.outputs.log }}
63+
```
64+
65+
</p>
66+
</details>
67+
branch: update_manifest
68+

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
99
Unicode = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
1010

1111
[compat]
12-
julia = "1"
1312
CEnum = "0.2"
13+
julia = "1.0"
1414

1515
[extras]
1616
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

0 commit comments

Comments
 (0)