Adding automated docker version tag for stable releases

- Added set to parse version to x.x.x format for tag. (This is the same way we parse for sentry release maps)

- Added additional build and push step for docker with parse version as tag.
This commit is contained in:
Robbie Davis 2021-07-25 13:20:38 -04:00
parent d97e81d53e
commit 2209a65d52

View File

@ -40,6 +40,14 @@ jobs:
- name: Echo csproj version - name: Echo csproj version
run: echo "${{steps.get-version.outputs.assembly-version}}" run: echo "${{steps.get-version.outputs.assembly-version}}"
- name: Parse Version
run: |
version='${{steps.get-version.outputs.assembly-version}}'
newVersion=${version%.*}
echo $newVersion
echo "::set-output name=VERSION::$newVersion"
id: parse-version
- name: Compile dotnet app - name: Compile dotnet app
uses: actions/setup-dotnet@v1 uses: actions/setup-dotnet@v1
with: with:
@ -75,6 +83,15 @@ jobs:
push: true push: true
tags: kizaing/kavita:latest tags: kizaing/kavita:latest
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: kizaing/kavita:${{ steps.parse-version.outputs.VERSION }}
- name: Image digest - name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }} run: echo ${{ steps.docker_build.outputs.digest }}