Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,46 @@
name: Run pipeline

on: push
on:
push:
branches:
- main
pull_request:

permissions:
contents: write

# Make sure we only ever run one per branch so we don't have issues pushing
# after running the pipeline
concurrency:
group: calkit-run-${{ github.ref }}
cancel-in-progress: false

jobs:
main:
name: Run
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# For PRs, checkout the head ref to avoid detached HEAD
ref: ${{ github.head_ref || github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Git credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Setup uv
uses: astral-sh/setup-uv@v5
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
auto-activate-base: true
conda-remove-defaults: true
- run: pip install calkit-python
- name: Install Calkit
run: uv tool install calkit-python
- name: Restore DVC cache
id: cache-dvc-restore
uses: actions/cache/restore@v4
Expand All @@ -33,8 +52,9 @@ jobs:
- run: calkit config remote-auth
env:
CALKIT_DVC_TOKEN: ${{ secrets.CALKIT_DVC_TOKEN }}
- run: dvc pull
- run: calkit dvc pull
- run: calkit run
# If running on a PR, push to that branch, else push to main
- run: calkit save -am "Run pipeline"
env:
CALKIT_DVC_TOKEN: ${{ secrets.CALKIT_DVC_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions dvc.lock
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ stages:
nfiles: 2
- path: paper/paper.tex
hash: md5
md5: 1480301e18c57bf533d604e1a3593101
size: 653
md5: 09f2923d7ec5a75fefe95497d6e177cd
size: 678
outs:
- path: paper/paper.pdf
hash: md5
md5: 13ee8eb76f777de6242c16c15d054673
size: 94915
md5: bff1721a57af4275b13af9dd8033ad9a
size: 95417
_check_env_py:
cmd: calkit check conda-env --file environment.yml --output
.calkit/env-locks/py.yml
Expand Down
2 changes: 2 additions & 0 deletions paper/paper.tex
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ \section{Section 2}

This is another sentence in the second section.

This was added in a PR.

%--/Paper--

\end{document}