Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated the Docker and Github container registery deploy action. Bot… #24

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 36 additions & 39 deletions .github/workflows/docker_ghcr_io.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,41 @@
name: Publish Docker image
name: Publish Docker images

on:
release:
branches: main
push:
branches:
- 'main'

jobs:
build-and-push-image:
docker:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Get short SHA
id: slug
run: echo "::set-output name=sha12::$(echo ${GITHUB_SHA} | cut -c1-12)"

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.MY_GITHUB_RESISTRY_TOKEN }}

- name: Build AVX container image and push to ghcr
uses: docker/build-push-action@v2
with:
context: docker-images/avx
push: true
tags: ghcr.io/usda-ars-gbru/guidemaker-avx:sha-${{ steps.slug.outputs.sha12 }}

- name: Build NON-AVX container image and push to ghcr
uses: docker/build-push-action@v2
with:
context: docker-images/nonavx
push: true
tags: ghcr.io/usda-ars-gbru/guidemaker-nonavx:sha-${{ steps.slug.outputs.sha12 }}

- name: Build WEBAPP container image and push to ghcr
uses: docker/build-push-action@v2
with:
context: docker-images/webapp
push: true
tags: ghcr.io/usda-ars-gbru/guidemaker-webapp:sha-${{ steps.slug.outputs.sha12 }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get short SHA
id: slug
run: echo "::set-output name=sha12::$(echo ${GITHUB_SHA} | cut -c1-12)"
-
name: Build and push AVX version of guidemaker
uses: docker/build-push-action@v5
with:
context: docker-images/webapp
push: true
tags: ghcr.io/usda-ars-gbru/guidemaker-webapp:sha-${{ steps.slug.outputs.sha12 }}
-
name: Build and push noavx version of guidemaker
uses: docker/build-push-action@v5
with:
context: docker-images/noavx
push: true
tags: ghcr.io/usda-ars-gbru/guidemaker-noavx:sha-${{ steps.slug.outputs.sha12 }}
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ RUN cp GuideMaker/guidemaker/data/Pseudomonas_aeruginosa.gbk.gz .
RUN cp GuideMaker/guidemaker/data/Carsonella_ruddii.gbk.gz .

# run web app
CMD streamlit run GuideMaker/guidemaker/data/app.py --server.maxUploadSize 500
CMD streamlit run GuideMaker/guidemaker/data/app.py --server.maxUploadSize 5000
10 changes: 5 additions & 5 deletions docker-images/nonavx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ ARG MAMBA_DOCKERFILE_ACTIVATE=1

USER root
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
python3-dev \
zlib1g-dev \
git && apt-get clean \
build-essential=12.9 \
python3-dev=3.9 \
zlib1g-dev=1.2 \
git=2.30 && apt-get clean \
&& rm -rf /var/lib/apt/lists/*
USER $MAMBA_USER

Expand All @@ -34,4 +34,4 @@ RUN cp GuideMaker/guidemaker/data/Pseudomonas_aeruginosa.gbk.gz .
RUN cp GuideMaker/guidemaker/data/Carsonella_ruddii.gbk.gz .

# run web app
CMD streamlit run GuideMaker/guidemaker/data/app.py --server.maxUploadSize 500
CMD streamlit run GuideMaker/guidemaker/data/app.py --server.maxUploadSize 5000
Loading