懂 .github/workflows/blank.yml 的进

编译打包和其他
回复
头像
flwwater
帖子: 806
注册时间: 2010-10-31 9:15
系统: kubuntu 24.04

懂 .github/workflows/blank.yml 的进

#1

帖子 flwwater » 2025-04-04 7:44

有一个appimage,居然可以在ubuntu 16.04上跑,但是看它构建内容,貌似是基于ubuntu22.04的。
特别是下面这一段,为什么又是ubuntu22.04,又是artixlinux,appimage到底是在哪个系统上构建的?
jobs:
build:
runs-on: ubuntu-22.04
container: artixlinux/artixlinux:latest

代码: 全选

name: Appimage
concurrency:
  group: build-${{ github.ref }}
  cancel-in-progress: true

on:
  schedule:
    - cron: "0 15 * * 0"
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-22.04
    container: artixlinux/artixlinux:latest
    steps:
    - uses: actions/checkout@v4

    - name: build
      if: always()
      run: |
        sed -i 's/DownloadUser/#DownloadUser/g' /etc/pacman.conf
        pacman -Syu --noconfirm base-devel strace patchelf curl wget xcb-util-cursor \
          desktop-file-utils git artix-archlinux-support llvm mesa xorg-server-xvfb
        pacman-key --init && pacman-key --populate archlinux
        printf "\n[extra]\nInclude = /etc/pacman.d/mirrorlist-arch\n" | tee -a /etc/pacman.conf
        pacman -Syu --noconfirm zsync strawberry qt6ct qt6-wayland pulseaudio pulseaudio-alsa pipewire-audio

    - name: Install iculess libxml2 and qt6-core
      run: |
        QT6_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/qt6-base-iculess-x86_64.pkg.tar.zst"
        LIBXML_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/libxml2-iculess-x86_64.pkg.tar.zst"
        wget --retry-connrefused --tries=30 "$QT6_URL" -O ./qt6-base-iculess.pkg.tar.zst
        wget --retry-connrefused --tries=30 "$LIBXML_URL" -O ./libxml2-iculess.pkg.tar.zst
        pacman -U --noconfirm ./qt6-base-iculess.pkg.tar.zst ./libxml2-iculess.pkg.tar.zst
        rm -f ./qt6-base-iculess.pkg.tar.zst ./libxml2-iculess.pkg.tar.zst

    - name: Install ffmpeg mini
      run: |
        FFMPEG_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/ffmpeg-mini-x86_64.pkg.tar.zst"
        wget --retry-connrefused --tries=30 "$FFMPEG_URL" -O ./ffmpeg-mini-x86_64.pkg.tar.zst
        pacman -U --noconfirm ./ffmpeg-mini-x86_64.pkg.tar.zst
        rm -f ./ffmpeg-mini-x86_64.pkg.tar.zst

    - name: Make AppImage
      run: |
        chmod +x ./*-appimage.sh && ./*-appimage.sh
        mkdir dist
        mv *.AppImage* dist/

    - name: Check version file
      run: |
       cat ~/version
       echo "APP_VERSION=$(cat ~/version)" >> "${GITHUB_ENV}"
    
    - name: Upload artifact
      uses: actions/[email protected]
      with:
        name: AppImage
        path: 'dist'
        
    - name: Upload version file
      uses: actions/[email protected]
      with:
       name: version
       path: ~/version
    
  release:
      needs: [build]
      permissions: write-all
      runs-on: ubuntu-latest

      steps:
        - uses: actions/[email protected]
          with:
            name: AppImage
        - uses: actions/[email protected]
          with:
            name: version

        - name: Read version
          run: |
            cat version
            export VERSION="$(<version)"
            echo "APP_VERSION=${VERSION}" >> "${GITHUB_ENV}"
    
        #Version Release
        - name: Del Previous Release
          run: |
            gh release delete "${APP_VERSION}" --repo "${GITHUB_REPOSITORY}" --cleanup-tag  -y
            sleep 5
          env:
            GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
          continue-on-error: true
        - name: Continuous Releaser
          uses: softprops/action-gh-release@v2
          with:
            name: "strawberry AppImage ${{ env.APP_VERSION }}"
            tag_name: "${{ env.APP_VERSION }}"
            prerelease: false
            draft: false
            generate_release_notes: false
            make_latest: true
            files: |
              *.AppImage*
          continue-on-error: false

        #Snapshot Release
        - name: Get Date
          run: |
            SNAPSHOT_TAG="$(date --utc +'%Y%m%d-%H%M%S')"
            echo SNAPSHOT_TAG="${SNAPSHOT_TAG}" >> "${GITHUB_ENV}"
          continue-on-error: false
        - name: Snapshot Releaser
          uses: softprops/action-gh-release@v2
          with:
            name: "Snapshot ${{ env.APP_VERSION }}"
            tag_name: "${{ env.SNAPSHOT_TAG }}"
            prerelease: false
            draft: false
            generate_release_notes: false
            make_latest: false
            files: |
              *.AppImage*
          continue-on-error: false
个人收藏的数百个精美动态壁纸:
https://url17.ctfile.com/d/15983117-593 ... 768?p=6220
(访问密码:6220


个人收藏的经典国语音乐和纯音乐(钢琴,笛子,二胡等):
https://url17.ctfile.com/d/15983117-446 ... 33e?p=6220
(访问密码:6220



如果访问密码不对,可试试这个密码 566816
头像
qy117121
论坛版主
帖子: 50586
注册时间: 2007-12-14 13:40
系统: Winbuntu
来自: 志虚国乌由市
联系:

Re: 懂 .github/workflows/blank.yml 的进

#2

帖子 qy117121 » 2025-04-04 9:00

代码: 全选

jobs:
  build:
    runs-on: ubuntu-22.04  #运行主机22.04
    container: artixlinux/artixlinux:latest  #容器系统 artixlinux
    steps:
    - uses: actions/checkout@v4
在22.04里运行artixlinux容器跑下面的编译代码

代码: 全选

    - name: build
      if: always()
      run: |
        sed -i 's/DownloadUser/#DownloadUser/g' /etc/pacman.conf
        pacman -Syu --noconfirm base-devel strace patchelf curl wget xcb-util-cursor \
          desktop-file-utils git artix-archlinux-support llvm mesa xorg-server-xvfb
        pacman-key --init && pacman-key --populate archlinux
        printf "\n[extra]\nInclude = /etc/pacman.d/mirrorlist-arch\n" | tee -a /etc/pacman.conf
        pacman -Syu --noconfirm zsync strawberry qt6ct qt6-wayland pulseaudio pulseaudio-alsa pipewire-audio
这些就是在容器里运行
渠月 · QY   
本人只会灌水,不负责回答问题
无聊可以点一下→ http://u.nu/ubuntu

邮箱 [email protected]
头像
qy117121
论坛版主
帖子: 50586
注册时间: 2007-12-14 13:40
系统: Winbuntu
来自: 志虚国乌由市
联系:

Re: 懂 .github/workflows/blank.yml 的进

#3

帖子 qy117121 » 2025-04-04 9:45

渠月 · QY   
本人只会灌水,不负责回答问题
无聊可以点一下→ http://u.nu/ubuntu

邮箱 [email protected]
头像
flwwater
帖子: 806
注册时间: 2010-10-31 9:15
系统: kubuntu 24.04

Re: 懂 .github/workflows/blank.yml 的进

#4

帖子 flwwater » 2025-04-05 9:28

qy117121 写了: 2025-04-04 9:45 https://github.com/pkgforge-dev/strawbe ... 9819192344
可以看看他的运行logs
谢谢 :Haha
个人收藏的数百个精美动态壁纸:
https://url17.ctfile.com/d/15983117-593 ... 768?p=6220
(访问密码:6220


个人收藏的经典国语音乐和纯音乐(钢琴,笛子,二胡等):
https://url17.ctfile.com/d/15983117-446 ... 33e?p=6220
(访问密码:6220



如果访问密码不对,可试试这个密码 566816
回复