Skip to content

Commit

Permalink
Add GHA workflow to resolve Manifest file
Browse files Browse the repository at this point in the history
  • Loading branch information
penelopeysm committed Sep 9, 2024
1 parent 6014490 commit 2be4188
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/resolve_manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This action runs Pkg.instantiate() and Pkg.resolve() every time the master
# branch is pushed to. If this leads to a change in the Manifest.toml file, it
# will open a PR to update the Manifest.toml file. This ensures that the
# contents of the Manifest in the repository are consistent with the contents
# of the Manifest used by the CI system (i.e. during the actual docs
# generation).
#
# See https://github.com/TuringLang/docs/issues/518 for motivation.

name: Resolve Manifest
on:
push:
branches:
- master
workflow_dispatch:

jobs:
check-version:
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write

env:
# Disable precompilation as it takes a long time and is not needed for this workflow
JULIA_PKG_PRECOMPILE_AUTO: 0

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Julia
uses: julia-actions/setup-julia@v2

- name: Instantiate and resolve
run: |
julia -e 'using Pkg; Pkg.instantiate(); Pkg.resolve()'
- name: Open PR
id: create_pr
uses: peter-evans/create-pull-request@v6
with:
branch: resolve-manifest
add-paths: Manifest.toml
commit-message: "Update Manifest.toml"
body: "This PR is automatically generated by the `resolve_manifest.yml` GitHub Action."
title: "Update Manifest.toml to match CI environment"

0 comments on commit 2be4188

Please sign in to comment.