Skip to content

Update Tower CLI to v0.9.0 #84

Update Tower CLI to v0.9.0

Update Tower CLI to v0.9.0 #84

Workflow file for this run

name: CI/CD Action
on:
push:
branches:
- dev
- main
pull_request:
release:
types: [published]
workflow_dispatch:
jobs:
run-tower:
name: Launch on Nextflow Tower
# Don't try to run on forked repos
if: github.repository == 'seqeralabs/action-tower-launch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./
id: runs
# Use repository secrets for sensitive fields
with:
pipeline: hello_world
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}
compute_env: ${{ secrets.TOWER_COMPUTE_ENV }}
run_name: ${{ github.job }}_${{ github.sha }}
workdir: ${{ secrets.AWS_S3_BUCKET }}/work/${{ github.sha }}
- name: Comment PR
if: github.event_name == 'pull_request'
uses: thollander/actions-comment-pull-request@v2
with:
message: |
### 🚀 Pipeline launched, monitor progress [here](${{ steps.runs.outputs.workflowUrl }}).
| Name | Info |
|------|------|
| 🔨 Workflow ID | `${{ steps.runs.outputs.workflowId }}` |
| 🏠 Workspace | `${{ steps.runs.outputs.workspaceRef }}` |
| 🗂️ Workspace ID | `${{ steps.runs.outputs.workspaceId }}` |
| 😎 Workflow URL | ${{ steps.runs.outputs.workflowUrl }} |
comment_tag: towerrun
- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
if: failure() && github.event_name == 'pull_request'
with:
message: |
### :x: Pipeline launch failed
The pipeline launch failed. Check the logs uploaded as an artifact for more information.
comment_tag: towerrun
- uses: ./
id: runfails
continue-on-error: true
with:
pipeline: no_pipeline_exists
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}
compute_env: ${{ secrets.TOWER_COMPUTE_ENV }}
run_name: ${{ github.job }}_${{ github.sha }}
workdir: ${{ secrets.AWS_S3_BUCKET }}/work/${{ github.sha }}
- name: Check Failure
if: steps.runfails.outcome == 'success'
run: |
echo "Failed to catch invalid pipeline submission: ${{ steps.runfails.outcome }}"
exit 1
- uses: actions/upload-artifact@v3
if: success()
with:
name: ${{ github.job }}_run_json
path: tower_action_*.json
- uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: Tower debug log file
path: tower_action_*.log