Skip to content

Commit 1c592a5

Browse files
authored
Create docker-publish.yml
1 parent 7cf3263 commit 1c592a5

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish Docker Image
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repo
13+
uses: actions/checkout@v3
14+
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v2
17+
18+
- name: Login to Docker Hub
19+
uses: docker/login-action@v2
20+
with:
21+
username: ${{ secrets.DOCKER_USER }}
22+
password: ${{ secrets.DOCKER_PASSWORD }}
23+
24+
- name: Build and push
25+
uses: docker/build-push-action@v4
26+
with:
27+
push: true
28+
platforms: linux/amd64,linux/arm64
29+
tags: ${{ secrets.DOCKER_USER }}/${{ secrets.DOCKER_REPO }}:latest,${{ secrets.DOCKER_USER }}/${{ secrets.DOCKER_REPO }}:${{ github.sha }}

0 commit comments

Comments
 (0)