{"id":17285305,"url":"https://github.com/ewels/tower-action","last_synced_at":"2025-08-06T17:32:27.450Z","repository":{"id":49809020,"uuid":"383380602","full_name":"ewels/tower-action","owner":"ewels","description":"See the main repo here:","archived":false,"fork":false,"pushed_at":"2023-03-28T09:05:28.000Z","size":847,"stargazers_count":2,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-04T20:15:24.574Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/nf-core/tower-action","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ewels.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-06T07:34:14.000Z","updated_at":"2023-09-28T13:17:48.000Z","dependencies_parsed_at":"2023-01-18T16:02:29.370Z","dependency_job_id":null,"html_url":"https://github.com/ewels/tower-action","commit_stats":{"total_commits":78,"total_committers":4,"mean_commits":19.5,"dds":"0.16666666666666663","last_synced_commit":"0ea2734b1ed8c31645716694c7ea568fa4e3c01b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewels%2Ftower-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewels%2Ftower-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewels%2Ftower-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewels%2Ftower-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ewels","download_url":"https://codeload.github.com/ewels/tower-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228936786,"owners_count":17994652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T09:56:17.482Z","updated_at":"2024-12-09T17:45:32.147Z","avatar_url":"https://github.com/ewels.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![nf-core/tower-action](img/nfcore-toweraction_logo.png)\n\n**A GitHub Action to launch a workflow using [Nextflow Tower](https://tower.nf) - \u003chttps://tower.nf\u003e.**\n\nThis action uses the [Nextflow Tower CLI](https://github.com/seqeralabs/tower-cli/).\n\n## Example usage\n\n### Minimal example\n\nThis runs the current GitHub repository pieline on [Nextflow Tower](https://tower.nf) at the current commit hash when pushed to the `dev` branch. The workflow runs on the user's personal workspace.\n\n```yaml\non:\n  push:\n    branches: [dev]\n\njobs:\n  run-tower:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: nf-core/tower-action@v2\n        # Use repository secrets for sensitive fields\n        with:\n          access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}\n      - uses: actions/upload-artifact@v3\n        with:\n          name: Tower debug log file\n          path: tower_action_*.log\n```\n\n### Complete example\n\nThis example never runs automatically, but creates a button under the GitHub repository _Actions_ tab that can be used to manually trigger the workflow.\n\nIt runs on a specified installation of Tower, with a specific organisation workspace. It also calls an external pipeline to be run at a pinned version tag.\n\nThe `--outdir` parameter is used to save results to a separate directory in the AWS bucket and the pipeline uses two config profiles.\n\n```yaml\nname: Launch on Tower\n\n# Manually trigger the action with a button in GitHub\n# Alternatively, trigger on release / push etc.\non:\n  workflow_dispatch:\n\njobs:\n  run-tower:\n    name: Launch on Nextflow Tower\n    # Don't try to run on forked repos\n    if: github.repository == 'YOUR_USERNAME/REPO'\n    runs-on: ubuntu-latest\n    steps:\n      - uses: nf-core/tower-action@v2\n        # Use repository secrets for sensitive fields\n        with:\n          workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}\n          access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}\n          api_endpoint: ${{ secrets.TOWER_API_ENDPOINT }}\n          compute_env: ${{ secrets.TOWER_COMPUTE_ENV }}\n          pipeline: YOUR_USERNAME/REPO\n          revision: v1.2.1\n          workdir: ${{ secrets.AWS_S3_BUCKET }}/work/${{ github.sha }}\n          # Set any custom pipeline params here - JSON object as a string\n          parameters: |\n            {\n                \"outdir\": \"${{ secrets.AWS_S3_BUCKET }}/results/${{ github.sha }}\"\n            }\n          # List of pipeline config profiles to use - comma separated list as a string\n          profiles: test,aws_tower\n      - uses: actions/upload-artifact@v3\n        with:\n          name: Tower debug log file\n          path: tower_action_*.log\n```\n\n## Inputs\n\nPlease note that a number of these inputs are sensitive and should be kept secure. We recommend saving them as appropriate using GitHub repository [encrypted secrets](https://docs.github.com/en/actions/reference/encrypted-secrets). They can then be accessed with `${{ secrets.SECRET_NAME }}` in your GitHub actions workflow.\n\nNote that if you are using secrets, these will be screened in the GitHub Actions log and appear as `***`.\n\n### `access_token`\n\n**[Required]** Nextflow Tower personal access token.\n\nVisit \u003chttps://tower.nf/tokens\u003e to generate a new access token.\n\nSee the [Nextflow Tower documentation for more details](https://help.tower.nf/getting-started/usage/#via-nextflow-run-command):\n\n![workspace ID](img/usage_create_token.png)\n![workspace ID](img/usage_name_token.png)\n![workspace ID](img/usage_token.png)\n\n### `workspace_id`\n\n**[Optional]** Nextflow Tower workspace ID.\n\nNextflow Tower organisations can have multiple _Workspaces_. Use this field to choose a specific workspace.\n\nDefault: Your personal user's workspace.\n\nYour Workspace ID can be found in the organisation's _Workspaces_ tab:\n\n![workspace ID](img/workspace_id.png)\n\nDefault: Your primary workspace.\n\n### `compute_env`\n\n**[Optional]** Nextflow Tower compute environment name _(not ID)_.\n\nDefault: Your primary compute environment.\n\n### `api_endpoint`\n\n**[Optional]** Nextflow Tower API URL endpoint.\n\nDefault: `api.tower.nf`\n\n### `pipeline`\n\n**[Optional]** Workspace pipeline name or full pipeline URL.\n\nFor example, `https://github.com/nf-core/sarek`.\nCan also be the name of a preconfigured pipeline in Nextflow Tower.\n\nDefault: The current GitHub repository (`https://github.com/${{github.repository}}`).\n\n### `revision`\n\n**[Optional]** Pipeline revision.\n\nA pipeline release tag, branch or commit hash.\n\nDefault: The current GitHub commit hash (`github.sha`).\n\n### `workdir`\n\n**[Required]** Nextflow work directory.\n\nThe location that temporary working files should be stored. Must be accessible in the Nextflow Tower compute environment used.\n\n### `parameters`\n\n**[Optional]** Pipeline parameters.\n\nAdditional pipeline parameters.\n\nThese should be supplied as a valid JSON object, quoted as a string in your GitHub Actions workflow. See example usage above for an example.\n\n\u003e JSON is required (not YAML) because we do some parsing and dumping to ensure that the action handles multi-line string formatting correctly.\n\n### `profiles`\n\n**[Optional]** Nextflow config profiles.\n\nPipeline config profiles to use. Should be comma separated without spaces.\n\n### `nextflow_config`\n\n**[Optional]** Nextflow config options.\n\nUseful to pass custom Nextflow config options to the `tw launch` command e.g.\n\n```yaml\njobs:\n  run-tower:\n    steps:\n      - uses: nf-core/tower-action@v2\n        with:\n          nextflow_config: |\n            process.errorStrategy = 'retry'\n            process.maxRetries = 3\n          # Truncated..\n```\n\n### `pre_run_script`\n\n**[Optional]** Pre-run script before launch.\n\nPre-run script executed before pipeline launch. This would be particularly useful if you wanted to use a different version of Nextflow than the default available in Tower. You can set this in the pipeline Github Actions:\n\n```yaml\njobs:\n  run-tower:\n    steps:\n      - uses: nf-core/tower-action@v2\n        with:\n          pre_run_script: 'export NXF_VER=21.10.3'\n          # Truncated..\n```\n\n## Outputs\n\nThe action prints normal stdout info-level log messages to the actions console. However, it saves a verbose log file to `tower_action_*.log` (the `*` is a timestamp). We recommend using [`actions/upload-artifact`](https://github.com/actions/upload-artifact) in your GitHub Actions workflow as shown in the examples above, this will then expose this file as a download through the workflow summary page.\n\n## Credits\n\nThis GitHub Action was written by Phil Ewels ([@ewels](https://github.com/ewels)), with help from and based on earlier work by Gisela Gabernet ([@ggabernet](https://github.com/ggabernet)).\n\n## Citation\n\nIf you use `nf-core/tower-action` in your work, please cite the `nf-core` publication as follows:\n\n\u003e **The nf-core framework for community-curated bioinformatics pipelines.**\n\u003e\n\u003e Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso \u0026 Sven Nahnsen.\n\u003e\n\u003e _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fewels%2Ftower-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fewels%2Ftower-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fewels%2Ftower-action/lists"}