generated from GLAM-Workbench/glam-workbench-template
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.53 KB
/
docker_push.yml
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
47
48
49
50
51
52
53
54
55
name: docker-push
on:
push:
branches:
- master
jobs:
Create-Docker-image:
runs-on: ubuntu-latest
steps:
- name: checkout files in repo
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install jupytext
python -m pip install jupyterlab
- name: Convert README to index.ipynb
run: |
sed '/^<\!-- START RUN INFO/,/^<\!-- END RUN INFO/d;' README.md > index.md
jupytext -k python3 --to ipynb index.md
- name: Commit index.ipynb
uses: EndBug/add-and-commit@v7.1.0
with:
add: index.ipynb
- name: update jupyter dependencies with repo2docker
uses: jupyterhub/repo2docker-action@master
with:
DOCKER_USERNAME: ${{ secrets.QUAY_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
DOCKER_REGISTRY: "quay.io"
BINDER_CACHE: true
IMAGE_NAME: glamworkbench/${{ github.event.repository.name }}
- name: Modify readme for DockerHub
run: |
sed -i -r 's/\[(.*)\]\(.*\.ipynb\)/\1/' README.md
- name: push README to Quay.io
uses: christian-korneck/update-container-description-action@v1
env:
DOCKER_APIKEY: ${{ secrets.API_KEY__QUAY_IO }}
with:
destination_container_repo: quay.io/glamworkbench/${{ github.event.repository.name }}
provider: quay
readme_file: 'README.md'