Skip to content

Commit 1c85a97

Browse files
committed
Add a publish workflow
1 parent b105a6c commit 1c85a97

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish Docker image
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
publish-docker-image:
8+
environment:
9+
name: "docker-hub"
10+
url: https://hub.docker.com/r/trustdns/trust-dns
11+
name: Build and test image and publish the image
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v2
16+
- name: Build docker image
17+
run: make build-alpine
18+
- name: Test docker image
19+
run: make test-alpine
20+
- name: Login to DockerHub
21+
uses: docker/login-action@v1
22+
with:
23+
username: ${{ secrets.DOCKER_HUB_USER }}
24+
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
25+
- name: Push docker image
26+
run: make push

0 commit comments

Comments
 (0)