Skip to content

Commit

Permalink
chore: autobump conda envs (#571)
Browse files Browse the repository at this point in the history
* Add autobump action

* fix paths

* dbg

* dbg branch

* add checkout

* dbg

* trigger rerun

* entity regex and add label

* dbg

* Update autobump.yml

* Update autobump.yml
  • Loading branch information
johanneskoester authored Oct 12, 2022
1 parent 8cb0391 commit d932cc8
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 9 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/autobump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Tests

# TODO replace by nightly cron job
on:
schedule:
- cron: "0 0 * * 5"

jobs:
autobump:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.SNAKEDEPLOY_BOT_APP_ID }}
private_key: ${{ secrets.SNAKEDEPLOY_BOT_PRIVATE_KEY }}

- name: Update conda envs
uses: snakemake/snakedeploy-github-action@v1
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
with:
subcommand: update-conda-envs
args: "*/*/environment.yaml */*/*/environment.yaml --create-prs --entity-regex '(?P<entity>.+)/environment.yaml' --pr-add-label"
17 changes: 8 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ on:
branches:
- master
pull_request:
branches_ignore: []
schedule:
- cron: '0 0 * * 0'
branches:
- "*"

jobs:
docs:
Expand Down Expand Up @@ -37,12 +36,12 @@ jobs:

- name: Setup Snakemake environment
run: |
# ensure that mamba is happy to write into the cache
sudo chown -R runner:docker /usr/share/miniconda/pkgs/cache
conda install -c conda-forge mamba --quiet
export PATH="/usr/share/miniconda/bin:$PATH"
mamba create -c bioconda -c conda-forge --quiet -y --name snakemake snakemake-minimal pytest
conda config --set channel_priority strict
# ensure that mamba is happy to write into the cache
sudo chown -R runner:docker /usr/share/miniconda/pkgs/cache
conda install -c conda-forge mamba --quiet
export PATH="/usr/share/miniconda/bin:$PATH"
mamba create -c bioconda -c conda-forge --quiet -y --name snakemake snakemake-minimal pytest
conda config --set channel_priority strict
- name: Fetch master
if: github.ref != 'refs/heads/master'
Expand Down

0 comments on commit d932cc8

Please sign in to comment.