Skip to content

Commit 4a41e8c

Browse files
committed
ci: write dockerize action
1 parent 07da622 commit 4a41e8c

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/dockerize.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: dockerize
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
8+
jobs:
9+
docker:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Generate Docker metadata
13+
id: meta
14+
uses: docker/metadata-action@v3
15+
with:
16+
images: |
17+
docker.io/huanttok/redis-migrator
18+
tags: |
19+
type=semver,pattern={{major}}.{{minor}}.{{patch}}
20+
flavor: |
21+
latest=true
22+
- name: Login to Docker Hub
23+
uses: docker/login-action@v2
24+
with:
25+
username: ${{ secrets.DOCKERHUB_USERNAME }}
26+
password: ${{ secrets.DOCKERHUB_TOKEN }}
27+
- name: Build and push
28+
uses: docker/build-push-action@v3
29+
with:
30+
push: true
31+
tags: ${{ steps.meta.outputs.tags }}

0 commit comments

Comments
 (0)