Merge pull request #249 from PRIME-TU-Delft/#165-alternative-basis #145
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 build & push image | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set lowercase repository owner environment variable (funky workaround because Docker is dumb) | |
run: | | |
echo "OWNER_LOWERCASE=${OWNER,,}" >>${GITHUB_ENV} | |
env: | |
OWNER: '${{ github.repository_owner }}' | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ env.OWNER_LOWERCASE }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push (web) | |
uses: docker/build-push-action@v3 | |
with: | |
file: 'Dockerfile' | |
push: true | |
tags: ghcr.io/${{ env.OWNER_LOWERCASE }}/interactive-visuals-web:latest | |
- name: Build and push (docs) | |
uses: docker/build-push-action@v3 | |
with: | |
file: 'Dockerfile-docs' | |
push: true | |
tags: ghcr.io/${{ env.OWNER_LOWERCASE }}/interactive-visuals-docs:latest |