-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.19 KB
/
docker-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Docker Image CI
on:
create:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: zgldh
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: zgldh/benthos-modbus-processor:${{ steps.get_version.outputs.VERSION }}, zgldh/benthos-modbus-processor:latest
# - name: Docker Action
# # You may pin to the exact commit or the version.
# # uses: zenato/docker-action@8309ea4d790d074676660449b9f2bcbcae25cdb9
# uses: zenato/docker-action@v1.0.0
# with:
# # Registry username
# username: zgldh
# # Registry password
# password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
# # Repository on registry
# repository: zgldh/benthos-modbus-processor
# # Registry hostname
# #registry: # optional
# # Image tag
# tag: ${{ steps.get_version.outputs.VERSION }}