-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Update pango-collapse | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '30 5 * * TUE' | ||
|
||
run-name: Updating pango-collapse | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get latest release | ||
uses: rez0n/actions-github-release@main | ||
id: latest_release | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
repository: MDU-PHL/pango-collapse | ||
type: "stable" | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Remove V | ||
id: strip | ||
run: | | ||
version=$(echo "${{ steps.latest_release.outputs.release }}" | sed 's/V//g' | sed 's/v//g' ) | ||
echo "The version is $version" | ||
echo "version=$version" >> $GITHUB_OUTPUT | ||
- name: pull repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get current date | ||
id: date | ||
run: | | ||
date=$(date '+%Y-%m-%d') | ||
echo "the date is $date" | ||
echo "date=$date" >> $GITHUB_OUTPUT | ||
- name: check paths | ||
run: ls && ls ./pango-collapse | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Quay | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_USERNAME }} | ||
password: ${{ secrets.QUAY_PASSWORD }} | ||
|
||
- name: Build and push to Quay | ||
uses: docker/build-push-action@v3 | ||
with: | ||
file: ./pango-collapse/Dockerfile | ||
build-args: VER=${{ steps.strip.outputs.version }} | ||
push: true | ||
tags: quay.io/uphl/pango-collapse:${{ steps.strip.outputs.version }}-${{ steps.date.outputs.date }} | ||
|
||
- name: Build and push latest tag to Quay | ||
uses: docker/build-push-action@v3 | ||
with: | ||
file: ./pango-collapse/Dockerfile | ||
build-args: VER=${{ steps.strip.outputs.version }} | ||
push: true | ||
tags: quay.io/uphl/pango-collapse:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM python:3.9.17-slim as app | ||
|
||
# List all software versions are ARGs near the top of the dockerfile | ||
# 'ARG' sets environment variables during the build stage | ||
# ARG variables are ONLY available during image build, they do not persist in the final image | ||
ARG VER="0.7.2" | ||
|
||
# 'LABEL' instructions tag the image with metadata that might be important to the user | ||
LABEL base.image="python:3.9.17-slim" | ||
LABEL dockerfile.version="1" | ||
LABEL software="pango-collapse" | ||
LABEL software.version="${VER}" | ||
LABEL description="collapse lineages up to the first user defined parent lineage" | ||
LABEL website="https://github.com/MDU-PHL/pango-collapse" | ||
LABEL license="https://github.com/MDU-PHL/pango-collapse?tab=GPL-3.0-1-ov-file#readme" | ||
LABEL maintainer="Erin Young" | ||
LABEL maintainer.email="eriny@utah.gov" | ||
|
||
# 'RUN' executes code during the build | ||
# Install dependencies via apt-get or yum if using a centos or fedora base | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
procps \ | ||
ca-certificates && \ | ||
apt-get autoclean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Install and/or setup more things. Make /data for use as a working dir | ||
# For readability, limit one install per 'RUN' statement. | ||
RUN pip install --no-cache pango-collapse==${VER} && pango-collapse --help | ||
|
||
ENV PATH="$PATH" \ | ||
LC_ALL=C | ||
|
||
# 'CMD' instructions set a default command when the container is run. This is typically 'tool --help.' | ||
CMD pango-collapse --help | ||
|
||
# 'WORKDIR' sets working directory | ||
WORKDIR /data |