-
Notifications
You must be signed in to change notification settings - Fork 18
46 lines (40 loc) · 1.34 KB
/
repo2docker.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Repo2Docker
on:
push:
branches:
- main
paths:
- 'conda/**'
jobs:
build-image-and-push:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Get CalenderVersion UTC Date
id: calver
run: echo "::set-output name=version::$(date +'%Y.%m.%d')"
- name: Build and Push to DockerHub
uses: jupyterhub/repo2docker-action@master
with:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
IMAGE_NAME: ${{ secrets.DOCKER_IMAGE }}
ADDITIONAL_TAG: ${{ steps.calver.outputs.version }}
MYBINDERORG_TAG: ${{ github.event.ref }} # This builds the container on mybinder.org
- name: Also Push To quay.io
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ secrets.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 ${{secrets.DOCKER_IMAGE}}:latest conda list --export