Skip to content

update CI

update CI #8

Workflow file for this run

name: "build"
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Pull pre-built Docker image
run: docker pull ghcr.io/${{ github.repository }}:latest
- name: Install Nextflow
uses: stracquadaniolab/[email protected]
- name: Cache Nextflow dependencies
uses: actions/cache@v2
with:
path: ${{ env.HOME }}/.nextflow
key: ${{ runner.os }}-nextflow-${{ hashFiles('nextflow.config') }}
restore-keys: |
${{ runner.os }}-nextflow-
- name: Test Nextflow pipeline
run: |
docker run --rm \
-v ${{ github.workspace }}:/workspace \
-w /workspace \
ghcr.io/${{ github.repository }}:latest \
nextflow run . -profile test,ci,docker
- name: Push image to GitHub Container Registry
if: startsWith(github.event.ref, 'refs/tags')
uses: docker/build-push-action@v2
with:
context: .
file: containers/Dockerfile
platforms: linux/amd64
push: true
tags: |
ghcr.io/${{ github.repository }}:v0.0.10, ghcr.io/${{ github.repository }}:latest