-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.1 KB
/
docker-build-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
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