Skip to content

CI: modify docker.yml #7

CI: modify docker.yml

CI: modify docker.yml #7

Workflow file for this run

# Author: Kang Lin <kl222@126.com>

Check failure on line 1 in .github/workflows/docker.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/docker.yml

Invalid workflow file

(Line: 19, Col: 9): A sequence was not expected
name: docker
on:
workflow_call:
outputs:
name:
description: "The artifact name"
value: ${{ jobs.build_docker.outputs.name }}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
jobs:
build_docker:
strategy:
matrix:
- PACKAGE: deb
image: ubuntu
lable: ":25.04"
os: ubuntu-24.04
- PACKAGE: deb
image: ubuntu
lable: ":25.04"
os: ubuntu-24.04-arm
- PACKAGE: appimage
image: ubuntu
lable: ":25.04"
os: ubuntu-24.04
- PACKAGE: appimage
image: ubuntu
lable: ":25.04"
os: ubuntu-24.04-arm
- PACKAGE: rpm
image: fedora
lable: ":41"
os: ubuntu-24.04
- PACKAGE: rpm
image: fedora
lable: ":41"
os: ubuntu-24.04-arm
# See: [About GitHub-hosted runners](https://docs.github.com/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners)
# See: [Choosing the runner for a job](https://docs.github.com/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job)
# See: https://github.com/actions/runner-images/
runs-on: ${{matrix.os}}
env:
RabbitRemoteControl_VERSION: 0.0.36
artifact_name: build_docker
# Map the job outputs to step outputs
outputs:
name: ${{ env.artifact_name }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: run docker
run: |
./Script/build_linux.sh --docker --docker-image="${{matrix.image}}${{matrix.lable}}" --${{matrix.PACKAGE}}
- name: AppIagme update configure file
if: ${{ matrix.PACKAGE == 'appimage' }}
#continue-on-error: true
run: |
sudo Xvfb :91.0 -ac -screen 0 1200x900x24 &
sleep 1
export DISPLAY=:91.0
echo "Update update_linux.json ......"
export QT_XCB_GL_INTEGRATION=none
#export QT_DEBUG_PLUGINS=1
ARCH=`uname -m`
cp ${{github.workspace}}/build_linux/RabbitRemoteControl_${ARCH}.AppImage RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_${ARCH}.AppImage
mkdir -p RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_${ARCH}_Setup
pushd RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_${ARCH}_Setup
cp ${{github.workspace}}/RabbitRemoteControl_${ARCH}.AppImage RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_${ARCH}.AppImage
chmod a+x RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_${ARCH}.AppImage
cp ${{github.workspace}}/build_appimage/AppDir/usr/share/applications/io.github.KangLin.RabbitRemoteControl.desktop io.github.KangLin.RabbitRemoteControl.desktop
cp ${{github.workspace}}/build_appimage/AppDir/usr/share/icons/hicolor/scalable/apps/io.github.KangLin.RabbitRemoteControl.svg io.github.KangLin.RabbitRemoteControl.svg
cp ${{github.workspace}}/Script/install.sh install.sh
chmod a+x install.sh
popd
zip RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_${ARCH}_Setup.zip RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_${ARCH}_Setup/*
md5sum RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_${ARCH}.AppImage > RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_${ARCH}.AppImage.md5sum
MD5SUM=`cat RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_${ARCH}.AppImage.md5sum|awk '{print $1}'`
echo "MD5SUM RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_${ARCH}.AppImage: ${MD5SUM}"
echo "Generate update configure file ......"
./RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_${ARCH}.AppImage \
-f "${{github.workspace}}/update_appimage_${{matrix.os}}_qt${{matrix.qt_version}}.json" \
--foc 1 \
--file-name RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_${ARCH}.AppImage \
-u "https://github.com/KangLin/RabbitRemoteControl/releases/download/v${{env.RabbitRemoteControl_VERSION}}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_${ARCH}.AppImage;https://master.dl.sourceforge.net/project/rabbitremotecontrol/v${{env.RabbitRemoteControl_VERSION}}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_${ARCH}.AppImage?viasf=1" \
--md5 "${MD5SUM}"
- name: Update artifact
#if: ${{matrix.PACKAGE != 'deb'}}
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}_${{matrix.PACKAGE}}_${{matrix.image}}_${{matrix.os}}
path: |
${{github.workspace}}/build_linux/rabbitremotecontrol*.rpm
${{github.workspace}}/build_linux/rabbitremotecontrol_*.deb
${{github.workspace}}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_${ARCH}.AppImage