code_path is not used anymore #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker | |
on: | |
push: | |
branches: [ "main" ] | |
paths: | |
- 'config/**' | |
- 'workflows/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: create environment with mamba | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
mamba-version: "*" | |
channels: conda-forge,bioconda,defaults | |
auto-activate-base: false | |
activate-environment: snakemake | |
environment-file: environment.yml | |
- name: check solution | |
run: | | |
mamba env export | |
- name: Make the dag | |
run: | | |
snakemake --dag | dot -Tsvg > dag.svg | |
- name: Check for changes | |
id: check_changes | |
run: | | |
if [[ -n "$(git diff --exit-code)" ]]; then | |
echo "Changes detected." | |
echo "::set-output name=has_changes::true" | |
else | |
echo "No changes detected." | |
echo "::set-output name=has_changes::false" | |
fi | |
# Commit and Push Changes | |
- name: Commit and Push Changes | |
if: steps.check_changes.outputs.has_changes == 'true' | |
run: | | |
# configure user | |
git config --global user.name "${{ github.actor }}" | |
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
# stage any file changes to be committed | |
git add . | |
# make commit with staged changes | |
git commit -m 'update dag' | |
# push the commit back up to source GitHub repository | |
git push |