build-and-push-jupyterlab-image #2
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: build-and-push-jupyterlab-image | |
on: | |
workflow_dispatch: # This allows you to manually trigger the action from GitHub UI. | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3.5.0 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2.5.0 | |
- name: Login to dockerhub | |
uses: docker/login-action@v2.1.0 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Get lowercase repo name (for dynamic tags) | |
id: repo_name | |
run: | | |
lowercase_name=$(echo ${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]') | |
echo "::set-output name=repo_name::${lowercase_name}" | |
- name: Build and push latest | |
id: docker_build_jupyterlab | |
uses: docker/build-push-action@v4.0.0 | |
with: | |
context: docker/jupyterlab | |
file: docker/jupyterlab/Dockerfile | |
builder: ${{ steps.buildx.outputs.name }} | |
push: true | |
tags: | | |
esiil/${{ steps.repo_name.outputs.repo_name }}_jupyterlab:latest | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |