This commit is contained in:
@@ -41,21 +41,34 @@ jobs:
|
|||||||
username: tobimai
|
username: tobimai
|
||||||
password: ${{ secrets.docker_registry_key }}
|
password: ${{ secrets.docker_registry_key }}
|
||||||
- name: Extract Version from Cargo.toml
|
- name: Extract Version from Cargo.toml
|
||||||
id: cargo_version
|
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(grep '^version' Cargo.toml | head -n 1 | cut -d ' ' -f 3 | tr -d '"')
|
VERSION_PATCH=$(grep '^version' Cargo.toml | head -n 1 | cut -d ' ' -f 3 | tr -d '"')
|
||||||
echo "VERSION=$VERSION" >> $GITEA_ENV
|
VERSION_MINOR=$(grep '^version' Cargo.toml | head -n 1 | cut -d ' ' -f 3 | tr -d '"' | cut -d '.' -f 1,2)
|
||||||
- name: Extract Version from Cargo.toml
|
VERSION_MAJOR=$(grep '^version' Cargo.toml | head -n 1 | cut -d ' ' -f 3 | tr -d '"' | cut -d '.' -f 1,2)
|
||||||
id: Extract version from cargo.toml
|
echo "VERSION_PATCH=$VERSION_PATCH" >> $GITEA_ENV
|
||||||
run: |
|
echo "VERSION_MINOR=$VERSION_MINOR" >> $GITEA_ENV
|
||||||
VERSION=$(grep '^version' Cargo.toml | head -n 1 | cut -d ' ' -f 3 | tr -d '"')
|
echo "VERSION_MAJOR=$VERSION_MAJOR" >> $GITEA_ENV
|
||||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
echo "Patch Version: $VERSION_PATCH"
|
||||||
- name: Build and Push Docker Image
|
echo "Minor Version: $VERSION_MINOR"
|
||||||
|
echo "Major Version: $VERSION_MAJOR"
|
||||||
|
- name: Build and Push Docker Image for Patch version
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: gitea.maiertobi.de/tobimai/iot:${{ env.VERSION }}
|
tags: gitea.maiertobi.de/tobimai/iot:${{ env.VERSION_PATCH }}
|
||||||
|
- name: Build and Push Docker Image for minor version
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: gitea.maiertobi.de/tobimai/iot:${{ env.VERSION_MINOR }}
|
||||||
|
- name: Build and Push Docker Image for major version
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: gitea.maiertobi.de/tobimai/iot:${{ env.VERSION_MAJOR }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user