Skip to content

Commit

Permalink
Update update_pango_aliasor.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
erinyoung authored Dec 9, 2024
1 parent 920cc16 commit 1548ab2
Showing 1 changed file with 25 additions and 18 deletions.
43 changes: 25 additions & 18 deletions .github/workflows/update_pango_aliasor.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
##### ------------------------------------------------------------------------------------------------ #####
##### This caller workflow tests, builds, and pushes the image to Docker Hub and Quay using the most #####
##### recent version of pango_aliasor and downloads the current pangolin lineages. #####
##### recent version of Freyja and downloading the most recent variant information. #####
##### It takes no manual input. #####
##### ------------------------------------------------------------------------------------------------ #####

name: Update pango aliasor
name: Update Freyja

on:
workflow_dispatch:
schedule:
- cron: '30 7 * * 1'

run-name: Updating pango aliasor
run-name: Updating Freyja

jobs:
update:
runs-on: ubuntu-latest
steps:

steps:
- name: pull repo
uses: actions/checkout@v4
uses: actions/checkout@v4

- name: set pango_aliasor version
- name: set freyja version
id: latest_version
run: |
version=0.3.0
version=1.5.2
echo "version=$version" >> $GITHUB_OUTPUT
file=pango_aliasor/0.3.0/Dockerfile
file=freyja/$version/Dockerfile
ls $file
echo "file=$file" >> $GITHUB_OUTPUT
Expand All @@ -39,11 +38,19 @@ jobs:
id: docker_build_to_test
uses: docker/build-push-action@v5
with:
context: pango_aliasor/${{ steps.latest_version.outputs.version }}
file: ${{ steps.latest_version.outputs.file }}
target: test
load: true
push: false
tags: pango_aliasor:update
tags: freyja:update

- name: get freyja database version
id: db_version
run: |
docker run freyja:update freyja demix --version
version=$(docker run freyja:update freyja demix --version | grep . | grep -v Barcode | head -n 1)
echo "the latest version is $version"
echo "version=$version" >> $GITHUB_OUTPUT
- name: Get current date
id: date
Expand All @@ -65,18 +72,18 @@ jobs:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}

- name: Build and push user-defined tag to DockerHub
id: docker_build_user_defined_tag
- name: Build and push Dockerfile
id: docker_build_and_push
uses: docker/build-push-action@v5
with:
file: ${{ steps.latest_version.outputs.file }}
target: app
push: true
tags: |
staphb/pango_aliasor:${{ steps.latest_version.outputs.version }}-${{ steps.date.outputs.date }}
staphb/pango_aliasor:latest
quay.io/staphb/pango_aliasor:${{ steps.latest_version.outputs.version }}-${{ steps.date.outputs.date }}
quay.io/staphb/pango_aliasor:latest
staphb/freyja:${{ steps.latest_version.outputs.version }}-${{ steps.db_version.outputs.version }}-${{ steps.date.outputs.date }}
staphb/freyja:latest
quay.io/staphb/freyja:${{ steps.latest_version.outputs.version }}-${{ steps.db_version.outputs.version }}-${{ steps.date.outputs.date }}
quay.io/staphb/freyja:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
run: echo ${{ steps.docker_build_user_defined_tag.outputs.digest }}

0 comments on commit 1548ab2

Please sign in to comment.