Skip to content

Commit 7ca4698

Browse files
authored
install gitversion from official actions (#29)
* added dependabot * install gitversion via official actions * remove tag-prefix for container * cargo update
1 parent 012711b commit 7ca4698

File tree

3 files changed

+158
-138
lines changed

3 files changed

+158
-138
lines changed

.github/dependabot.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
version: 2
22
updates:
3-
- package-ecosystem: cargo
4-
directory: /
5-
schedule:
6-
interval: weekly
7-
ignore:
8-
- dependency-name: something
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
time: "04:00"
8+
9+
- package-ecosystem: cargo
10+
directory: /
11+
schedule:
12+
interval: weekly
13+
ignore:
14+
- dependency-name: something

.github/workflows/ci.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,25 @@ jobs:
2525
build_app:
2626
runs-on: ubuntu-latest
2727
outputs:
28-
SemVer: ${{ steps.gitversion.outputs.SemVer }}
29-
FullSemVer: ${{ steps.gitversion.outputs.FullSemVer }}
28+
semVer: ${{ steps.gitversion.outputs.semVer }}
29+
fullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}
3030

3131
steps:
3232
- uses: actions/checkout@v3
3333
with:
3434
fetch-depth: 0
3535

36-
- name: gitversion
37-
shell: pwsh
36+
- name: gitversion (1 of 2)
37+
uses: gittools/actions/gitversion/setup@v0
38+
with:
39+
versionSpec: 5.x
40+
41+
- name: gitversion (2 of 2)
3842
id: gitversion
39-
run: |
40-
dotnet tool update -g GitVersion.Tool
41-
$GitVersion = dotnet-gitversion ${{ github.workspace }} /nofetch | ConvertFrom-Json
42-
Write-Host "SemVer=$($GitVersion.SemVer)"
43-
echo "SemVer=$($GitVersion.SemVer)" >> $env:GITHUB_OUTPUT
44-
Write-Host "FullSemVer=$($GitVersion.FullSemVer)"
45-
echo "FullSemVer=$($GitVersion.FullSemVer)" >> $env:GITHUB_OUTPUT
43+
uses: gittools/actions/gitversion/execute@v0
44+
with:
45+
useConfigFile: true
46+
additionalArguments: /nofetch
4647

4748
- name: cargo fetch
4849
run: cargo fetch
@@ -102,7 +103,7 @@ jobs:
102103
REGISTRY: ghcr.io
103104
#REPOSITORY: Note: set dynamically, i.e. github.repository_owner+IMAGE_NAME
104105
GIT_REPO: ${{ github.repository }}
105-
GIT_TAG: ${{ needs.build_app.outputs.SemVer }}
106+
GIT_TAG: ${{ needs.build_app.outputs.semVer }}
106107
GIT_BRANCH: ${{ github.ref }}
107108
GIT_COMMIT: ${{ github.sha }}
108109

@@ -174,7 +175,7 @@ jobs:
174175
env:
175176
REGISTRY: ghcr.io
176177
#REPOSITORY: Note: set dynamically, i.e. github.repository_owner+IMAGE_NAME
177-
GIT_TAG: ${{ needs.build_app.outputs.SemVer }}
178+
GIT_TAG: ${{ needs.build_app.outputs.semVer }}
178179
HELM_EXPERIMENTAL_OCI: 1
179180
HELM_VERSION_TO_INSTALL: 3.9.2 #Note: keep this version in sync inside the devcontainer
180181

@@ -240,3 +241,5 @@ jobs:
240241
needs: [build_app, build_image, push_chart]
241242
if: github.ref == 'refs/heads/main'
242243
uses: f2calv/gha-workflows/.github/workflows/gha-release-versioning.yml@v1
244+
with:
245+
tag-prefix: ''

0 commit comments

Comments
 (0)