Skip to content

Commit 5a2029d

Browse files
authored
Create docker-image.yml
1 parent 83ba4c8 commit 5a2029d

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/docker-image.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Docker Image CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Check out the repo
17+
uses: actions/checkout@v4
18+
19+
- name: Get next version
20+
uses: reecetech/version-increment@2023.9.3
21+
id: version
22+
with:
23+
scheme: semver
24+
increment: patch
25+
26+
- run: git tag ${{ steps.version.outputs.version }}
27+
- run: git push origin ${{ steps.version.outputs.version }}
28+
29+
- name: Login to Docker Hub
30+
uses: docker/login-action@v3
31+
with:
32+
username: ${{ secrets.DOCKER_USERNAME }}
33+
password: ${{ secrets.DOCKERHUB_TOKEN }}
34+
35+
36+
37+
- name: Build and push
38+
uses: docker/build-push-action@v5
39+
with:
40+
context: .
41+
push: true
42+
tags: blazordevlab/visitormanagement:${{ steps.version.outputs.version }}
43+
44+
- name: Build and push with latest tag
45+
uses: docker/build-push-action@v5
46+
with:
47+
context: .
48+
push: true
49+
tags: blazordevlab/visitormanagement:latest
50+

0 commit comments

Comments
 (0)