Skip to content

Commit

Permalink
Automatically detect version
Browse files Browse the repository at this point in the history
  • Loading branch information
ioppermann committed Feb 26, 2024
1 parent e6726dd commit 72c31af
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/build_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,39 @@ on:
- "**"

jobs:
versions:
runs-on: ubuntu-latest
outputs:
coreversion: ${{ steps.core.outputs.version }}
steps:
- name: Checkout core repo
uses: actions/checkout@v4
with:
repository: datarhei/core
path: ./core

- name: Get latest version from core
id: core
run: |
echo "version=$(cat ./core/app/version.go | grep -E -o '(Major|Minor|Patch): [0-9]+,' | sed -E 's/^.*: ([0-9]+),.*$/\1/g' | paste -sd '.' - )" >> "$GITHUB_OUTPUT"
- name: Show versions
run: |
echo "core: ${{ steps.core.outputs.version }}"
docker:
runs-on: [self-hosted]
strategy:
matrix:
include:
- core: "16.14.0"
- core: ${{ needs.versions.outputs.coreversion }}
os: alpine
os_version: "3.19"
golang: golang:1.21-alpine3.19
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
branch: main
latest: yes
- core: "16.14.0"
- core: ${{ needs.versions.outputs.coreversion }}
os: ubuntu
os_version: "20.04"
golang: golang:1.21-alpine3.19
Expand Down

0 comments on commit 72c31af

Please sign in to comment.