summaryrefslogtreecommitdiffstats
path: root/.github/workflows/version.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:36:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:36:04 +0000
commitb09c6d56832eb1718c07d74abf3bc6ae3fe4e030 (patch)
treed2caec2610d4ea887803ec9e9c3cd77136c448ba /.github/workflows/version.yml
parentInitial commit. (diff)
downloadicingadb-b09c6d56832eb1718c07d74abf3bc6ae3fe4e030.tar.xz
icingadb-b09c6d56832eb1718c07d74abf3bc6ae3fe4e030.zip
Adding upstream version 1.1.0.upstream/1.1.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.github/workflows/version.yml')
-rw-r--r--.github/workflows/version.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml
new file mode 100644
index 0000000..98d28c0
--- /dev/null
+++ b/.github/workflows/version.yml
@@ -0,0 +1,25 @@
+name: Version
+on:
+ push:
+ branches:
+ - master
+ pull_request: {}
+
+jobs:
+ version:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - uses: actions/setup-go@v2
+ with:
+ go-version: 1.18.x
+ - name: Check version
+ # TODO(elippmann): Needs adjustments as soon as we release from (support) branches too.
+ run: |
+ actual="$(go run cmd/icingadb/main.go --version | head -n1 | sed 's/Icinga DB version: \(.*\)/v\1/')"
+ expected="$(git describe --tags $(git rev-list --tags --max-count=1))"
+ echo "Actual version: $actual"
+ echo "Expected version: $expected"
+ test "$actual" = "$expected" || (echo "Versions do not match"; (exit 1))