Skip to content

Commit

Permalink
Merge pull request #88 from genomic-medicine-sweden/keepalive_api
Browse files Browse the repository at this point in the history
add keepalive api to keep repo active
  • Loading branch information
LilyAnderssonLee authored Sep 5, 2024
2 parents 0c599b9 + 820212a commit d7ecb6d
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 129 deletions.
138 changes: 73 additions & 65 deletions .github/workflows/build_dockerfile_pangolin_master.yml
Original file line number Diff line number Diff line change
@@ -1,84 +1,92 @@
name: Build and publish pangolin docker image for master

on:
schedule:
- cron: '0 0 * * *'
push:
schedule:
- cron: "0 0 * * *"
push:
branches:
- master

jobs:
get-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Test with environment variables
run: echo $RELEASE_DATE
env:
RELEASE_DATE: ${{ steps.date.outputs.date }}
- name: Fetch pangolin version
shell: bash
run: |
##Get pangolin-data version
curl -sL https://api.github.com/repos/cov-lineages/pangolin-data/releases/latest | \
jq -r ".tag_name" > versions/pangolin-data-latest-version.txt
pangolin_data_VER=$(cat versions/pangolin-data-latest-version.txt)
echo $pangolin_data_VER
- uses: actions/checkout@v2
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Test with environment variables
run: echo $RELEASE_DATE
env:
RELEASE_DATE: ${{ steps.date.outputs.date }}
- name: Fetch pangolin version
shell: bash
run: |
##Get pangolin-data version
curl -sL https://api.github.com/repos/cov-lineages/pangolin-data/releases/latest | \
jq -r ".tag_name" > versions/pangolin-data-latest-version.txt
pangolin_data_VER=$(cat versions/pangolin-data-latest-version.txt)
echo $pangolin_data_VER
##Get constellations version
curl -sL https://api.github.com/repos/cov-lineages/constellations/releases/latest | \
jq -r ".tag_name" > versions/constellations-latest-version.txt
constellations_VER=$(cat versions/constellations-latest-version.txt)
echo $constellations_VER
##Get constellations version
curl -sL https://api.github.com/repos/cov-lineages/constellations/releases/latest | \
jq -r ".tag_name" > versions/constellations-latest-version.txt
constellations_VER=$(cat versions/constellations-latest-version.txt)
echo $constellations_VER
##Get pangolin version
curl -sL https://api.github.com/repos/cov-lineages/pangolin/releases/latest | \
jq -r ".tag_name" > versions/pangolin-latest-version.txt
PANGOLIN_VER=$(cat versions/pangolin-latest-version.txt)
echo $PANGOLIN_VER
##Get pangolin version
curl -sL https://api.github.com/repos/cov-lineages/pangolin/releases/latest | \
jq -r ".tag_name" > versions/pangolin-latest-version.txt
PANGOLIN_VER=$(cat versions/pangolin-latest-version.txt)
echo $PANGOLIN_VER
##Get scorpio version
curl -sL https://api.github.com/repos/cov-lineages/scorpio/releases/latest | \
jq -r ".tag_name" > versions/scorpio-latest-version.txt
scorpio_VER=$(cat versions/scorpio-latest-version.txt)
echo $scorpio_VER
##Get scorpio version
curl -sL https://api.github.com/repos/cov-lineages/scorpio/releases/latest | \
jq -r ".tag_name" > versions/scorpio-latest-version.txt
scorpio_VER=$(cat versions/scorpio-latest-version.txt)
echo $scorpio_VER
- name: Check for modified files
id: git-check
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")

- name: Check for modified files
id: git-check
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Build new docker image
shell: bash
run: |
echo ${{ steps.date.outputs.date }}
REPO_VER=$(cat versions/pangolin-latest-version.txt | sed 's|v||')
pangolin_data_VER=$(cat versions/pangolin-data-latest-version.txt | sed 's|v||')
scorpio_VER=$(cat versions/scorpio-latest-version.txt | sed 's|v||')
constellations_VER=$(cat versions/constellations-latest-version.txt | sed 's|v||')
#Build docker for pangolin-check for specific requirements
docker build --no-cache -f environments/pangolin/Dockerfile -t genomicmedicinesweden/gms-artic-pangolin:latest -t genomicmedicinesweden/gms-artic-pangolin:${{ steps.date.outputs.date }}-p-${REPO_VER}-d-${pangolin_data_VER}-c-${constellations_VER}-s-${scorpio_VER} --build-arg PANGOLIN_VER=v${REPO_VER} .
- name: Build new docker image
shell: bash
run: |
echo ${{ steps.date.outputs.date }}
REPO_VER=$(cat versions/pangolin-latest-version.txt | sed 's|v||')
pangolin_data_VER=$(cat versions/pangolin-data-latest-version.txt | sed 's|v||')
scorpio_VER=$(cat versions/scorpio-latest-version.txt | sed 's|v||')
constellations_VER=$(cat versions/constellations-latest-version.txt | sed 's|v||')
#Build docker for pangolin-check for specific requirements
docker build --no-cache -f environments/pangolin/Dockerfile -t genomicmedicinesweden/gms-artic-pangolin:latest -t genomicmedicinesweden/gms-artic-pangolin:${{ steps.date.outputs.date }}-p-${REPO_VER}-d-${pangolin_data_VER}-c-${constellations_VER}-s-${scorpio_VER} --build-arg PANGOLIN_VER=v${REPO_VER} .
- name: Push Docker image to DockerHub
shell: bash
run: |
REPO_VER=$(cat versions/pangolin-latest-version.txt | sed 's|v||')
pangolin_data_VER=$(cat versions/pangolin-data-latest-version.txt | sed 's|v||')
scorpio_VER=$(cat versions/scorpio-latest-version.txt | sed 's|v||')
constellations_VER=$(cat versions/constellations-latest-version.txt | sed 's|v||')
#Push to dockerhub for pangolin with specific requirements
docker image push genomicmedicinesweden/gms-artic-pangolin:latest
docker image push genomicmedicinesweden/gms-artic-pangolin:${{ steps.date.outputs.date }}-p-${REPO_VER}-d-${pangolin_data_VER}-c-${constellations_VER}-s-${scorpio_VER}
- name: Push Docker image to DockerHub
shell: bash
run: |
REPO_VER=$(cat versions/pangolin-latest-version.txt | sed 's|v||')
pangolin_data_VER=$(cat versions/pangolin-data-latest-version.txt | sed 's|v||')
scorpio_VER=$(cat versions/scorpio-latest-version.txt | sed 's|v||')
constellations_VER=$(cat versions/constellations-latest-version.txt | sed 's|v||')
#Push to dockerhub for pangolin with specific requirements
docker image push genomicmedicinesweden/gms-artic-pangolin:latest
docker image push genomicmedicinesweden/gms-artic-pangolin:${{ steps.date.outputs.date }}-p-${REPO_VER}-d-${pangolin_data_VER}-c-${constellations_VER}-s-${scorpio_VER}
keepalive-job:
name: Keepalive Workflow
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: actions/checkout@v2
- uses: gautamkrishnar/keepalive-workflow@v2
132 changes: 70 additions & 62 deletions .github/workflows/build_dockerfile_pangolin_stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,74 +6,82 @@ jobs:
get-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Test with environment variables
run: echo $RELEASE_DATE
env:
RELEASE_DATE: ${{ steps.date.outputs.date }}
- name: Fetch pangolin version
shell: bash
run: |
##Get pangolin-data version
curl -sL https://api.github.com/repos/cov-lineages/pangolin-data/releases/latest | \
jq -r ".tag_name" > versions/pangolin-data-latest-version.txt
pangolin_data_VER=$(cat versions/pangolin-data-latest-version.txt)
echo $pangolin_data_VER
- uses: actions/checkout@v2
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Test with environment variables
run: echo $RELEASE_DATE
env:
RELEASE_DATE: ${{ steps.date.outputs.date }}
- name: Fetch pangolin version
shell: bash
run: |
##Get pangolin-data version
curl -sL https://api.github.com/repos/cov-lineages/pangolin-data/releases/latest | \
jq -r ".tag_name" > versions/pangolin-data-latest-version.txt
pangolin_data_VER=$(cat versions/pangolin-data-latest-version.txt)
echo $pangolin_data_VER
##Get constellations version
curl -sL https://api.github.com/repos/cov-lineages/constellations/releases/latest | \
jq -r ".tag_name" > versions/constellations-latest-version.txt
constellations_VER=$(cat versions/constellations-latest-version.txt)
echo $constellations_VER
##Get constellations version
curl -sL https://api.github.com/repos/cov-lineages/constellations/releases/latest | \
jq -r ".tag_name" > versions/constellations-latest-version.txt
constellations_VER=$(cat versions/constellations-latest-version.txt)
echo $constellations_VER
##Get pangolin version
curl -sL https://api.github.com/repos/cov-lineages/pangolin/releases/latest | \
jq -r ".tag_name" > versions/pangolin-latest-version.txt
PANGOLIN_VER=$(cat versions/pangolin-latest-version.txt)
echo $PANGOLIN_VER
##Get pangolin version
curl -sL https://api.github.com/repos/cov-lineages/pangolin/releases/latest | \
jq -r ".tag_name" > versions/pangolin-latest-version.txt
PANGOLIN_VER=$(cat versions/pangolin-latest-version.txt)
echo $PANGOLIN_VER
##Get scorpio version
curl -sL https://api.github.com/repos/cov-lineages/scorpio/releases/latest | \
jq -r ".tag_name" > versions/scorpio-latest-version.txt
scorpio_VER=$(cat versions/scorpio-latest-version.txt)
echo $scorpio_VER
##Get scorpio version
curl -sL https://api.github.com/repos/cov-lineages/scorpio/releases/latest | \
jq -r ".tag_name" > versions/scorpio-latest-version.txt
scorpio_VER=$(cat versions/scorpio-latest-version.txt)
echo $scorpio_VER
- name: Check for modified files
id: git-check
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")

- name: Check for modified files
id: git-check
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Build new docker image
shell: bash
run: |
echo ${{ steps.date.outputs.date }}
REPO_VER=$(cat versions/pangolin-latest-version.txt | sed 's|v||')
pangolin_data_VER=$(cat versions/pangolin-data-latest-version.txt | sed 's|v||')
scorpio_VER=$(cat versions/scorpio-latest-version.txt | sed 's|v||')
constellations_VER=$(cat versions/constellations-latest-version.txt | sed 's|v||')
#Build docker for pangolin-check for specific requirements
docker build --no-cache -f environments/pangolin/Dockerfile -t genomicmedicinesweden/gms-artic-pangolin-stage:latest -t genomicmedicinesweden/gms-artic-pangolin-stage:${{ steps.date.outputs.date }}-p-${REPO_VER}-d-${pangolin_data_VER}-c-${constellations_VER}-s-${scorpio_VER} --build-arg PANGOLIN_VER=v${REPO_VER} .
- name: Build new docker image
shell: bash
run: |
echo ${{ steps.date.outputs.date }}
REPO_VER=$(cat versions/pangolin-latest-version.txt | sed 's|v||')
pangolin_data_VER=$(cat versions/pangolin-data-latest-version.txt | sed 's|v||')
scorpio_VER=$(cat versions/scorpio-latest-version.txt | sed 's|v||')
constellations_VER=$(cat versions/constellations-latest-version.txt | sed 's|v||')
#Build docker for pangolin-check for specific requirements
docker build --no-cache -f environments/pangolin/Dockerfile -t genomicmedicinesweden/gms-artic-pangolin-stage:latest -t genomicmedicinesweden/gms-artic-pangolin-stage:${{ steps.date.outputs.date }}-p-${REPO_VER}-d-${pangolin_data_VER}-c-${constellations_VER}-s-${scorpio_VER} --build-arg PANGOLIN_VER=v${REPO_VER} .
- name: Push Docker image to DockerHub
shell: bash
run: |
REPO_VER=$(cat versions/pangolin-latest-version.txt | sed 's|v||')
pangolin_data_VER=$(cat versions/pangolin-data-latest-version.txt | sed 's|v||')
scorpio_VER=$(cat versions/scorpio-latest-version.txt | sed 's|v||')
constellations_VER=$(cat versions/constellations-latest-version.txt | sed 's|v||')
#Push to dockerhub for pangolin with specific requirements
docker image push genomicmedicinesweden/gms-artic-pangolin-stage:latest
docker image push genomicmedicinesweden/gms-artic-pangolin-stage:${{ steps.date.outputs.date }}-p-${REPO_VER}-d-${pangolin_data_VER}-c-${constellations_VER}-s-${scorpio_VER}
- name: Push Docker image to DockerHub
shell: bash
run: |
REPO_VER=$(cat versions/pangolin-latest-version.txt | sed 's|v||')
pangolin_data_VER=$(cat versions/pangolin-data-latest-version.txt | sed 's|v||')
scorpio_VER=$(cat versions/scorpio-latest-version.txt | sed 's|v||')
constellations_VER=$(cat versions/constellations-latest-version.txt | sed 's|v||')
#Push to dockerhub for pangolin with specific requirements
docker image push genomicmedicinesweden/gms-artic-pangolin-stage:latest
docker image push genomicmedicinesweden/gms-artic-pangolin-stage:${{ steps.date.outputs.date }}-p-${REPO_VER}-d-${pangolin_data_VER}-c-${constellations_VER}-s-${scorpio_VER}
keepalive-job:
name: Keepalive Workflow
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: actions/checkout@v2
- uses: gautamkrishnar/keepalive-workflow@v2
4 changes: 2 additions & 2 deletions workflows/articNcovNanopore.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ include {versions} from '../modules/analysis.nf'
include {pangoversions} from '../modules/analysis.nf'
include {fastqcNanopore} from '../modules/qc.nf'
include {multiqcNanopore} from '../modules/qc.nf'
include {pycoqc} from '../modules/qc.nf'
//include {pycoqc} from '../modules/qc.nf'

include {bamToCram} from '../modules/out.nf'

Expand All @@ -46,7 +46,7 @@ workflow sequenceAnalysisNanopolish {

multiqcNanopore(fastqcNanopore.out.zip)

pycoqc(ch_seqSummary)
//pycoqc(ch_seqSummary)

articDownloadScheme()

Expand Down

0 comments on commit d7ecb6d

Please sign in to comment.