Skip to content

Update docker-compose.yml #3

Update docker-compose.yml

Update docker-compose.yml #3

Workflow file for this run

name: CI
on:
push:
branches:
- main
paths-ignore:
- 'LICENSE'
- 'README.md'
- '.gitignore'
jobs:
build-image-and-push:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Set Docker Image Name Environment Variable
run: cat .env >> $GITHUB_ENV
- name: Get CalenderVersion UTC Date
id: calver
run: echo "::set-output name=version::$(date +'%Y.%m.%d')"
- name: Build and Push to DockerHub
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
if: env.DOCKER_PASSWORD != ''
uses: jupyterhub/repo2docker-action@master
with:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
IMAGE_NAME: ${{ env.DOCKER_IMAGE }}
ADDITIONAL_TAG: ${{ steps.calver.outputs.version }}
- name: Also Push To quay.io
env:
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
if: env.QUAY_PASSWORD != ''
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ env.DOCKER_IMAGE }}
tags: ${{ steps.calver.outputs.version }}
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"
- name: Report Image Size and Conda Packages
if: always()
run: |
docker images
docker run ${{ env.DOCKER_IMAGE }}:latest conda list --export