katbox/.github/workflows/create-push-image.yml
2021-11-24 14:04:24 -08:00

34 lines
1,023 B
YAML

name: Create Docker Images
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
name: Build and push to Quay
steps:
- uses: actions/checkout@v2
- name: Log into the container repository
run: |
docker login \
--username "${{ secrets.CONTAINER_REPO_USERNAME }}" \
--password "${{ secrets.CONTAINER_REPO_TOKEN }}" \
quay.io/katbox
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Build Driver and Stream
run: make build build-stream
- name: Build all of the container images
run: |
docker build . --tag quay.io/katbox/driver:latest --no-cache
docker build . -f ./stream/Dockerfile --tag quay.io/katbox/stream:latest --no-cache
- name: Push the images
if: github.ref == 'refs/heads/main'
run: |
docker push quay.io/katbox/driver:latest
docker push quay.io/katbox/stream:latest