snakemake / snakemake-github-action

A Github action for running a Snakemake workflow
MIT License
51 stars 12 forks source link

Unable to find Snakefile #25

Open pschloss opened 1 year ago

pschloss commented 1 year ago

I keep getting an error message that says, "Error: Snakefile "Snakefile" not found." My Snakefile is in workflow/ and I have an environment.yml file in workflow/envs/. workflow/ is in the root of the repository.

Here's what .github/workflows/build.yml looks like...

name: build

on: workflow_dispatch

jobs:
  build:
    name: build
    runs-on: ubuntu-latest

    steps:
      - name: Run Snakemake
        uses: snakemake/snakemake-github-action@v1
        with:
          directory: '.test'
          snakefile: 'Snakefile'
          args: '--cores 1 --use-conda --conda-cleanup-pkgs cache'

Here's the output from github action...

Run snakemake/snakemake-github-action@v1
  with:
    directory: .test
    snakefile: Snakefile
    args: --cores 1 --use-conda --conda-cleanup-pkgs cache
    task: run
/usr/bin/docker run --name d5581cd93fdd0b83f4a7893f773[2](https://github.com/pschloss/pds_drought_index/actions/runs/3268997026/jobs/5376043175#step:3:2)ddfaec5f1_7bc0c6 --label 8d5581 --workdir /github/workspace --rm -e "INPUT_DIRECTORY" -e "INPUT_SNAKEFILE" -e "INPUT_ARGS" -e "INPUT_STAGEIN" -e "INPUT_TASK" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/pds_drought_index/pds_drought_index":"/github/workspace" 8d5581:cd9[3](https://github.com/pschloss/pds_drought_index/actions/runs/3268997026/jobs/5376043175#step:3:3)fdd0b83f[4](https://github.com/pschloss/pds_drought_index/actions/runs/3268997026/jobs/5376043175#step:3:4)a7893f7732ddfaec[5](https://github.com/pschloss/pds_drought_index/actions/runs/3268997026/jobs/5376043175#step:3:5)f1  ".test" "Snakefile" "--cores 1 --use-conda --conda-cleanup-pkgs cache" "" "run"
Error: Snakefile "Snakefile" not found.

Any ideas what I'm doing wrong here? The repository can be found at https://github.com/pschloss/pds_drought_index

johnstonmj commented 1 year ago

How about changing: snakefile: 'Snakefile' to snakefile: 'workflow/Snakefile' ?