mirror of
https://github.com/datarhei/core.git
synced 2025-10-05 16:07:07 +08:00
Automatically detect version
This commit is contained in:
24
.github/workflows/build_base.yaml
vendored
24
.github/workflows/build_base.yaml
vendored
@@ -8,19 +8,39 @@ on:
|
|||||||
- "**"
|
- "**"
|
||||||
|
|
||||||
jobs:
|
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:
|
docker:
|
||||||
runs-on: [self-hosted]
|
runs-on: [self-hosted]
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- core: "16.14.0"
|
- core: ${{ needs.versions.outputs.coreversion }}
|
||||||
os: alpine
|
os: alpine
|
||||||
os_version: "3.19"
|
os_version: "3.19"
|
||||||
golang: golang:1.21-alpine3.19
|
golang: golang:1.21-alpine3.19
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
|
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
|
||||||
branch: main
|
branch: main
|
||||||
latest: yes
|
latest: yes
|
||||||
- core: "16.14.0"
|
- core: ${{ needs.versions.outputs.coreversion }}
|
||||||
os: ubuntu
|
os: ubuntu
|
||||||
os_version: "20.04"
|
os_version: "20.04"
|
||||||
golang: golang:1.21-alpine3.19
|
golang: golang:1.21-alpine3.19
|
||||||
|
Reference in New Issue
Block a user