Merge pull request #72 from mateuszskoczek/gitversion_config
Gitversion config
This commit is contained in:
11
.github/config/gitversion.yml
vendored
Normal file
11
.github/config/gitversion.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
next-version: 0.1.0
|
||||
assembly-versioning-scheme: MajorMinorPatch
|
||||
assembly-file-versioning-scheme: MajorMinorPatch
|
||||
|
||||
branches:
|
||||
master:
|
||||
regex: ^master$
|
||||
mode: ContinuousDelivery
|
||||
increment: Patch
|
||||
tag: ''
|
||||
is-release-branch: true
|
||||
21
.github/workflows/master_push.yml
vendored
21
.github/workflows/master_push.yml
vendored
@@ -34,6 +34,16 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup GitVersion
|
||||
uses: gittools/actions/gitversion/setup@v0.9.7
|
||||
with:
|
||||
versionSpec: 5.x
|
||||
- name: Determine Version
|
||||
uses: gittools/actions/gitversion/execute@v0.9.7
|
||||
id: gitversion
|
||||
with:
|
||||
useConfigFile: true
|
||||
configFilePath: .github/config/gitversion.yml
|
||||
- name: App Settings Variable Substitution
|
||||
uses: microsoft/variable-substitution@v1
|
||||
if: ${{ matrix.app == 'WatchIt.WebAPI' }}
|
||||
@@ -58,6 +68,15 @@ jobs:
|
||||
with:
|
||||
string: ${{ matrix.app }}
|
||||
- name: Build image
|
||||
run: docker build ${{ github.workspace }} -t ghcr.io/${{github.actor}}/${{ steps.name.outputs.lowercase }}:latest -f ${{ github.workspace }}/${{ matrix.app }}/${{ matrix.app }}/Dockerfile
|
||||
run: docker build ${{ github.workspace }} -t ghcr.io/${{github.actor}}/${{ steps.name.outputs.lowercase }}:latest -t ghcr.io/${{github.actor}}/${{ steps.name.outputs.lowercase }}:{{steps.gitversion.outputs.SemVer}} -f ${{ github.workspace }}/${{ matrix.app }}/${{ matrix.app }}/Dockerfile
|
||||
- name: Publish image
|
||||
run: docker push ghcr.io/${{github.actor}}/${{ steps.name.outputs.lowercase }} --all-tags
|
||||
- name: Create Release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{needs.build.outputs.version}}
|
||||
release_name: ${{needs.build.outputs.version}}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
Reference in New Issue
Block a user