Skip to content

main-latest

main-latest #26

Workflow file for this run

name: main-latest
on:
workflow_dispatch: # https://github.com/armsurvivors/kodi-rockchip-deb/actions/workflows/main-latest.yml
#push:
# branches: [ main ]
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- name: Prepare release ID
id: prep
run: |
echo ::set-output name=created::$(date -u +'%Y%m%d-%H%M')
outputs:
created: ${{ steps.prep.outputs.created }} # refer to as ${{needs.prepare.outputs.created}}
build:
needs: [ prepare ]
runs-on: ${{ matrix.arch.runner }}
strategy:
fail-fast: false # let other jobs try to complete if one fails
matrix:
arch: [ { name: 'arm64', runner: "ubuntu-24.04-arm" } ]
distro:
#- { id: 'bookworm', image: 'debian:bookworm' }
- { id: 'trixie', image: 'debian:trixie' }
- { id: 'forky', image: 'debian:forky' }
ffmpeg:
#- { branch: '7.1', id: '71' }
#- { branch: '8.0', id: '80' }
- { branch: '8.1', id: '81' }
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v4
- name: Prepare out dir ${{ matrix.arch.name }} ${{ matrix.distro.id }}
run: mkdir -p out
- name: Build ${{ matrix.arch.name }} ${{ matrix.distro.id }}
uses: docker/build-push-action@v7
timeout-minutes: 180
with:
context: .
file: ./Dockerfile
platforms: linux/${{ matrix.arch.name }}
load: false
pull: true # bring in updated versions of preexisting GH images
push: false
tags: kodi-rockchip-gbm:${{ matrix.arch.name }}
#cache-from: type=gha,scope=${{ matrix.arch.name }}_${{ matrix.distro.id }}
#cache-to: type=gha,scope=${{ matrix.arch.name }}_${{ matrix.distro.id }},mode=max # mode=max "export all the layers of all intermediate steps"
build-args: |
PACKAGE_VERSION=${{needs.prepare.outputs.created}}
BASE_IMAGE=${{ matrix.distro.image }}
OS_ARCH=${{ matrix.arch.name }}
FFMPEG_BRANCH=${{ matrix.ffmpeg.branch }}
FFMPEG_ID=${{ matrix.ffmpeg.id }}
outputs: |
type=local,dest=out
- name: Upload deb as artifact ${{ matrix.arch.name }} ${{ matrix.distro.id }}
uses: actions/upload-artifact@v7
with:
name: deb-${{ matrix.distro.id }}-ffmpeg-${{ matrix.ffmpeg.id }}
path: out/*.deb
release:
needs: [ prepare, build ] # depend on the previous jobs...
runs-on: ubuntu-latest
steps:
# Download the built artifacts from GH artifacts.
- uses: actions/download-artifact@v8
name: Download deb artifacts
with:
path: out
pattern: deb-*
merge-multiple: true
- name: List artifacts downloaded
run: |
ls -lahtR
# Release the artifacts into GitHub Releases
- name: "GH specific release"
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{needs.prepare.outputs.created}}"
prerelease: false
title: "${{needs.prepare.outputs.created}}"
files: |
out/*.deb