Merge branch 'main' into dev

This commit is contained in:
Ingo Oppermann 2024-02-29 15:15:29 +01:00
commit 40a98ca70e
No known key found for this signature in database
GPG Key ID: 2AB32426E9DD229E
4 changed files with 55 additions and 12 deletions

View File

@ -8,19 +8,40 @@ 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:
needs: versions
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

View File

@ -3,6 +3,8 @@ name: "Build dev base"
on: on:
workflow_dispatch: workflow_dispatch:
workflow_call: workflow_call:
schedule:
- cron: "7 4 * * *"
push: push:
branches: branches:
- dev - dev
@ -79,5 +81,6 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new cache-to: type=local,dest=/tmp/.buildx-cache-new
bundle: bundle:
needs: docker
uses: ./.github/workflows/build_bundle_dev.yaml uses: ./.github/workflows/build_bundle_dev.yaml
secrets: inherit secrets: inherit

View File

@ -3,19 +3,38 @@ name: "Build main bundles"
on: on:
workflow_dispatch: workflow_dispatch:
workflow_call: workflow_call:
schedule:
- cron: "7 5 * * *"
push: push:
branches-ignore: branches-ignore:
- "**" - "**"
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:
needs: versions
runs-on: [self-hosted] runs-on: [self-hosted]
strategy: strategy:
matrix: matrix:
include: include:
- core: "16.14.0" - core: ${{ needs.versions.outputs.coreversion }}
core_os: alpine3.19 core_os: alpine3.19
ffmpeg: "5.1.3" ffmpeg: "5.1.3"
ffmpeg_os: alpine3.16 ffmpeg_os: alpine3.16
@ -23,7 +42,7 @@ jobs:
branch: main branch: main
prefix: prefix:
latest: yes latest: yes
- core: "16.14.0" - core: ${{ needs.versions.outputs.coreversion }}
core_os: alpine3.19 core_os: alpine3.19
ffmpeg: "5.1.3-rpi" ffmpeg: "5.1.3-rpi"
ffmpeg_os: alpine3.16 ffmpeg_os: alpine3.16
@ -31,7 +50,7 @@ jobs:
branch: main branch: main
prefix: rpi- prefix: rpi-
latest: yes latest: yes
- core: "16.14.0" - core: ${{ needs.versions.outputs.coreversion }}
core_os: ubuntu20.04 core_os: ubuntu20.04
ffmpeg: "5.1.3-vaapi" ffmpeg: "5.1.3-vaapi"
ffmpeg_os: ubuntu20.04 ffmpeg_os: ubuntu20.04
@ -39,7 +58,7 @@ jobs:
branch: main branch: main
prefix: vaapi- prefix: vaapi-
latest: yes latest: yes
- core: "16.14.0" - core: ${{ needs.versions.outputs.coreversion }}
core_os: ubuntu20.04 core_os: ubuntu20.04
ffmpeg: "5.1.3-cuda" ffmpeg: "5.1.3-cuda"
ffmpeg_os: ubuntu20.04 ffmpeg_os: ubuntu20.04

View File

@ -6,16 +6,16 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with: with:
fetch-depth: 2 fetch-depth: 2
- uses: actions/setup-go@v2 - uses: actions/setup-go@v5
with: with:
go-version: "1.19" go-version: "1.22"
- name: Run coverage - name: Run coverage
run: go test -coverprofile=coverage.out -covermode=atomic -v ./... run: go test -coverprofile=coverage.out -covermode=atomic -v ./...
- name: Upload coverage to Codecov - name: Upload coverage to Codecov
uses: codecov/codecov-action@v2 uses: codecov/codecov-action@v4
with: with:
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out files: coverage.out