Skip to content

Commit

Permalink
add CI job for Docker Hub build and push
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamesits committed Aug 23, 2023
1 parent f697ba1 commit 979780c
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "Docker"

on:
push:
branches:
- 'master'

jobs:
docker:
runs-on: ubuntu-latest
strategy:
matrix:
variant: ["client", "server"]
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v4
with:
file: ./Dockerfile.${{ matrix.variant }}
tags: m13253/dns-over-https-${{ matrix.variant }}:latest
push: true
-
name: Logout from Docker Hub
uses: docker/login-action@v2
if: always()
with:
logout: true

0 comments on commit 979780c

Please sign in to comment.