Skip to content

Commit a3f363d

Browse files
author
Thomas Luijken
committed
Get version from Cargo.toml file
1 parent 769603c commit a3f363d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/BUILD_AND_DEPLOY.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,17 @@ jobs:
2626
steps:
2727
- uses: actions/checkout@v4
2828
name: Checkout
29+
- name: Get project version from Cargo.toml
30+
id: get_version
31+
run: |
32+
version=$(grep '^version' oxybox/Cargo.toml | head -n 1 | cut -d '"' -f2)
33+
echo "version=$version" >> $GITHUB_OUTPUT
2934
- uses: Baseflow/github-actions/docker@main
3035
name: Build docker image
3136
with:
3237
username: ${{ secrets.BASEFLOW_ACR_USERNAME }}
3338
password: ${{ secrets.BASEFLOW_ACR_PASSWORD }}
3439
push: ${{ github.event_name != 'pull_request' }}
3540
vulnerability_scan: ${{ github.event_name != 'pull_request' }}
36-
version: "1.10"
41+
version: ${{ steps.get_version.outputs.version }}
3742
context: ./oxybox

oxybox/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "oxybox"
3-
version = "0.1.0"
3+
version = "1.11.0"
44
edition = "2024"
55

66
[dependencies]

0 commit comments

Comments
 (0)