diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml index 1a03d9cb..4479549f 100644 --- a/.github/workflows/build_base.yaml +++ b/.github/workflows/build_base.yaml @@ -8,19 +8,40 @@ 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: + needs: versions 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 diff --git a/.github/workflows/build_base_dev.yaml b/.github/workflows/build_base_dev.yaml index 17ddf615..38261c89 100644 --- a/.github/workflows/build_base_dev.yaml +++ b/.github/workflows/build_base_dev.yaml @@ -3,6 +3,8 @@ name: "Build dev base" on: workflow_dispatch: workflow_call: + schedule: + - cron: "7 4 * * *" push: branches: - dev @@ -79,5 +81,6 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new bundle: + needs: docker uses: ./.github/workflows/build_bundle_dev.yaml secrets: inherit diff --git a/.github/workflows/build_bundle.yaml b/.github/workflows/build_bundle.yaml index cb839aac..c8562558 100644 --- a/.github/workflows/build_bundle.yaml +++ b/.github/workflows/build_bundle.yaml @@ -3,19 +3,38 @@ name: "Build main bundles" on: workflow_dispatch: workflow_call: - schedule: - - cron: "7 5 * * *" push: branches-ignore: - "**" 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: + needs: versions runs-on: [self-hosted] strategy: matrix: include: - - core: "16.14.0" + - core: ${{ needs.versions.outputs.coreversion }} core_os: alpine3.19 ffmpeg: "5.1.3" ffmpeg_os: alpine3.16 @@ -23,7 +42,7 @@ jobs: branch: main prefix: latest: yes - - core: "16.14.0" + - core: ${{ needs.versions.outputs.coreversion }} core_os: alpine3.19 ffmpeg: "5.1.3-rpi" ffmpeg_os: alpine3.16 @@ -31,7 +50,7 @@ jobs: branch: main prefix: rpi- latest: yes - - core: "16.14.0" + - core: ${{ needs.versions.outputs.coreversion }} core_os: ubuntu20.04 ffmpeg: "5.1.3-vaapi" ffmpeg_os: ubuntu20.04 @@ -39,7 +58,7 @@ jobs: branch: main prefix: vaapi- latest: yes - - core: "16.14.0" + - core: ${{ needs.versions.outputs.coreversion }} core_os: ubuntu20.04 ffmpeg: "5.1.3-cuda" ffmpeg_os: ubuntu20.04 diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index d0b86012..cd55ecfb 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -6,16 +6,16 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 2 - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v5 with: - go-version: "1.19" + go-version: "1.22" - name: Run coverage run: go test -coverprofile=coverage.out -covermode=atomic -v ./... - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} files: coverage.out