glotzerlab/workflows
houses reusable GitHub actions and workflows that are in common
use across glotzerlab software packages.
setup-uv
installs uv and optionally installs all the packages in a given
lockfile
.
To generate a lockfile, run:
uv pip compile --python-version 3.12 --python-platform linux requirements.in > requirements.txt
and add both requirements.in
and requirements.txt
to the git repository.
In your action workflow, create a Python environment and then call setup-uv:
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: "3.12"
- name: Set up Python environment
uses: glotzerlab/workflows/setup-uv@1747bc5c994ec280440dd051f2928791407692c8 # 0.5.1
with:
lockfile: "requirements.txt"
setup-mdbook
installs mdbook.
In your action workflow:
steps:
- name: Set up mdbook
uses: glotzerlab/workflows/setup-mdbook@1747bc5c994ec280440dd051f2928791407692c8 # 0.5.1
See setup-mdbook/action.yaml for all options.
setup-cargo-bundle-licenses
installs cargo-bundle-licenses.
In your action workflow:
steps:
- name: Set up mdbook
uses: glotzerlab/workflows/setup-cargo-bundle-licenses@1747bc5c994ec280440dd051f2928791407692c8 # 0.5.1
See setup-cargo-bundle-licenses/action.yaml for all options.
setup-row
installs row.
In your action workflow:
steps:
- name: Set up row
uses: glotzerlab/workflows/setup-row@1747bc5c994ec280440dd051f2928791407692c8 # 0.5.1
See setup-row/action.yaml for all options.
To reuse the standard stale workflow, create a workflow stale.yaml
with the
contents:
name: Close stale issues and PRs
on:
schedule:
- cron: '0 19 * * *'
workflow_dispatch:
jobs:
stale:
uses: glotzerlab/workflows/.github/workflows/stale.yaml@1747bc5c994ec280440dd051f2928791407692c8 # 0.5.1
To automatically update conda lock files monthly:
- Prepare a directory with the base
environment.yaml
and a script that updates all lock files (see https://github.com/glotzerlab/hoomd-blue/tree/trunk-minor/.github/workflows/environments for an example). - Ask an organization admin to install the pull request submitter bot.
- Create a workflow
update-conda-lockfiles.yaml
with the contents:
name: Update conda lockfiles
on:
schedule:
- cron: '0 12 1 * *'
workflow_dispatch:
jobs:
update:
uses: glotzerlab/workflows/.github/workflows/update-conda-lockfiles.yaml@1747bc5c994ec280440dd051f2928791407692c8 # 0.5.1
secrets: inherit
with:
branch: <name of default branch>
To automatically update uv lock files monthly:
- Prepare a directory with the base
requirements-*.in
files and a script that updates all lock files (see https://github.com/glotzerlab/rowan/tree/master/.github/workflows for an example). - Ask an organization admin to install the pull request submitter bot.
- Create a workflow
update-uv-lockfiles.yaml
with the contents:
name: Update uv lockfiles
on:
schedule:
- cron: '0 12 1 * *'
workflow_dispatch:
jobs:
update:
uses: glotzerlab/workflows/.github/workflows/update-uv-lockfiles.yaml@1747bc5c994ec280440dd051f2928791407692c8 # 0.5.1
secrets: inherit
with:
branch: <name of default branch>