Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
In preparation for merge from `dev` into `main`
  • Loading branch information
jdangerx committed Nov 9, 2023
2 parents d8512b5 + ce1b983 commit 1bb33dd
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/update-lockfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name: update-lockfile

on:
workflow_dispatch:
# schedule:
# At 5:28am UTC Monday and Thursday
# - cron: 28 5 * * MON,THU

jobs:
conda-lock:
# Don't run scheduled job on forks.
if: (github.event_name == 'schedule' && github.repository == 'catalyst-cooperative/pudl') || (github.event_name != 'schedule')
defaults:
run:
# Ensure the environment is activated
# <https://github.com/mamba-org/provision-with-micromamba#important>
shell: bash -l {0}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environments/conda-lock.yml
environment-name: pudl-dev

- name: Install pudl from branch
run: pip install --editable "./[dev,docs,test,datasette]"

- name: Run conda-lock to recreate lockfile from scratch
run: |
rm environments/conda-lock.yml
conda-lock \
--file=environments/dev-environment.yml \
--file=pyproject.toml \
--lockfile=environments/conda-lock.yml
- name: Open a pull request
uses: peter-evans/create-pull-request@v5
with:
# # The default GITHUB_TOKEN doesn't allow other workflows to trigger.
# # Thus if there are tests to be run, they won't be run. For more info,
# # see the note under
# # <https://github.com/peter-evans/create-pull-request#action-inputs>.
# # One possible workaround is to specify a Personal Access Token (PAT).
# # This PAT should have read-write permissions for "Pull Requests"
# # and read-write permissions for "Contents".
# token: ${{ secrets.GH_PAT_FOR_PR }}
commit-message: Update lockfile
title: Update Lockfile
body: >
This pull request relocks the dependencies with conda-lock.
It is triggered by [update-lockfile](https://github.com/catalyst-cooperative/pudl/blob/main/.github/workflows/update-lockfile.yml).
branch: update-lockfile
labels: dependencies, conda-lock
reviewers: zaneselvans
delete-branch: true

0 comments on commit 1bb33dd

Please sign in to comment.