Skip to content

Commit 2be4188

Browse files
committed
Add GHA workflow to resolve Manifest file
1 parent 6014490 commit 2be4188

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# This action runs Pkg.instantiate() and Pkg.resolve() every time the master
2+
# branch is pushed to. If this leads to a change in the Manifest.toml file, it
3+
# will open a PR to update the Manifest.toml file. This ensures that the
4+
# contents of the Manifest in the repository are consistent with the contents
5+
# of the Manifest used by the CI system (i.e. during the actual docs
6+
# generation).
7+
#
8+
# See https://github.com/TuringLang/docs/issues/518 for motivation.
9+
10+
name: Resolve Manifest
11+
on:
12+
push:
13+
branches:
14+
- master
15+
workflow_dispatch:
16+
17+
jobs:
18+
check-version:
19+
runs-on: ubuntu-latest
20+
21+
permissions:
22+
contents: write
23+
pull-requests: write
24+
25+
env:
26+
# Disable precompilation as it takes a long time and is not needed for this workflow
27+
JULIA_PKG_PRECOMPILE_AUTO: 0
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Setup Julia
34+
uses: julia-actions/setup-julia@v2
35+
36+
- name: Instantiate and resolve
37+
run: |
38+
julia -e 'using Pkg; Pkg.instantiate(); Pkg.resolve()'
39+
40+
- name: Open PR
41+
id: create_pr
42+
uses: peter-evans/create-pull-request@v6
43+
with:
44+
branch: resolve-manifest
45+
add-paths: Manifest.toml
46+
commit-message: "Update Manifest.toml"
47+
body: "This PR is automatically generated by the `resolve_manifest.yml` GitHub Action."
48+
title: "Update Manifest.toml to match CI environment"

0 commit comments

Comments
 (0)