Skip to content

Commit

Permalink
Update GitVersion and react to changes (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
mburumaxwell authored Aug 6, 2024
1 parent eae8b9f commit 35fe72e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ jobs:
fetch-depth: 0 # Required for GitVersion

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v2
uses: gittools/actions/gitversion/setup@v3.0.0
with:
versionSpec: '5.x'
versionSpec: '6.x'

- name: Determine Version
uses: gittools/actions/gitversion/execute@v2
uses: gittools/actions/gitversion/execute@v3.0.0
id: gitversion
with:
useConfigFile: true
Expand All @@ -71,7 +71,7 @@ jobs:
dotnet build
--configuration Release
--no-restore
-p:VersionPrefix=${{ steps.gitversion.outputs.nuGetVersion }}
-p:VersionPrefix=${{ steps.gitversion.outputs.fullSemVer }}
- name: Test
run: >
Expand All @@ -93,7 +93,7 @@ jobs:
--no-build
--configuration Release
--output ${{ github.workspace }}/drop
-p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersion }}
-p:PackageVersion=${{ steps.gitversion.outputs.fullSemVer }}
- name: Replace tokens
uses: cschleiden/replace-tokens@v1
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
with:
files: '["${{ github.workspace }}/deploy/main.parameters.json"]'
env:
DOCKER_IMAGE_TAG: ${{ steps.gitversion.outputs.nuGetVersionV2 }}
DOCKER_IMAGE_TAG: ${{ steps.gitversion.outputs.fullSemVer }}
NOTIFICATION_PASSWORD: ${{ secrets.NOTIFICATION_PASSWORD }}
CLEANER_PROJECT_TOKEN: ${{ secrets.CLEANER_PROJECT_TOKEN }}

Expand All @@ -151,7 +151,7 @@ jobs:
--label com.github.image.source.branch=${{ github.ref }} \
-t "ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest" \
-t "ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ steps.gitversion.outputs.shortSha }}" \
-t "ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ steps.gitversion.outputs.nuGetVersionV2 }}" \
-t "ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ steps.gitversion.outputs.fullSemVer }}" \
-t "ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ steps.gitversion.outputs.major}}.${{ steps.gitversion.outputs.minor }}" \
-t "ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ steps.gitversion.outputs.major }}" \
--cache-from ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest \
Expand All @@ -170,7 +170,7 @@ jobs:
- name: Push image (NuGetVersionV2)
if: ${{ !startsWith(github.ref, 'refs/pull') }}
run: docker push "ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ steps.gitversion.outputs.nuGetVersionV2 }}"
run: docker push "ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ steps.gitversion.outputs.fullSemVer }}"

- name: Push image (major, minor)
if: startsWith(github.ref, 'refs/tags')
Expand Down
2 changes: 1 addition & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
mode: ContinuousDeployment
branches:
pull-request:
tag: pr
label: pr

0 comments on commit 35fe72e

Please sign in to comment.