Merge pull request #42 from GLAM-Workbench/v3 #9
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
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' |