Skip to content

Commit 6528f2d

Browse files
pipeline - add semantic versioning
1 parent e3ccde7 commit 6528f2d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/dotnet.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will build a .NET project
22
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
33

4-
name: .NET
4+
name: Build and push to DockerHub
55

66
on:
77
push:
@@ -25,6 +25,12 @@ jobs:
2525
- name: Test
2626
run: dotnet test --no-build --verbosity normal
2727

28+
- name: Determine next version
29+
id: next-version
30+
uses: flatherskevin/semver-action@v1
31+
with:
32+
type: patch
33+
2834
- name: Login to Docker Hub
2935
uses: docker/login-action@v2
3036
with:
@@ -36,4 +42,6 @@ jobs:
3642
with:
3743
context: ./KubernetesTestApp/.
3844
push: true
39-
tags: ${{ secrets.DOCKERHUB_USERNAME }}/kubernetestestapp:latest
45+
tags: |
46+
${{ secrets.DOCKERHUB_USERNAME }}/kubernetestestapp:latest
47+
${{ secrets.DOCKERHUB_USERNAME }}/kubernetestestapp:${{ steps.next-version.outputs.next }}

0 commit comments

Comments
 (0)