找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 596|回复: 4

[R4A] Github Actions 编译Openwrt 成功为什么出包???

[复制链接]
悬赏3恩山币未解决


求指教 为什么没有出包???

附件: 您需要 登录 才可以下载或查看,没有账号?立即注册
因为你没登录看不到
回复

使用道具 举报

 楼主| | 显示全部楼层
badcrazy 发表于 2023-7-24 12:19
因为你没登录看不到

登入也是没有的~
回复

使用道具 举报

千玺弟弟 发表于 2023-7-24 12:47
登入也是没有的~

看下你的yml配置文件,UPLOAD_FIRMWARE: 后面是不是true



本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
回复

使用道具 举报

 楼主| | 显示全部楼层
本帖最后由 千玺弟弟 于 2023-7-24 15:01 编辑
badcrazy 发表于 2023-7-24 13:57
看下你的yml配置文件,UPLOAD_FIRMWARE: 后面是不是true
  1. #
  2. # Copyright (c) 2019-2020 P3TERX <https://p3terx.com>
  3. #
  4. # This is free software, licensed under the MIT License.
  5. # See /LICENSE for more information.cd openwrt/bin/targets/*/*
  6. #
  7. # https://github.com/P3TERX/Actions-OpenWrt
  8. # Description: Build OpenWrt using GitHub Actions
  9. #

  10. name: Build OpenWrt

  11. on:
  12.   repository_dispatch:
  13.   workflow_dispatch:
  14.     inputs:
  15.       ssh:
  16.         description: 'SSH connection to Actions'
  17.         required: false
  18.         default: 'false'

  19. env:
  20.   REPO_URL: https://github.com/x-wrt/x-wrt
  21.   REPO_BRANCH: '21.10'
  22.   FEEDS_CONF: feeds.conf.default
  23.   CONFIG_FILE: .config
  24.   DIY_P1_SH: diy-part1.sh
  25.   DIY_P2_SH: diy-part2.sh
  26.   UPLOAD_BIN_DIR: false
  27.   UPLOAD_FIRMWARE: true
  28.   UPLOAD_COWTRANSFER: false
  29.   UPLOAD_WETRANSFER: false
  30.   UPLOAD_RELEASE: false
  31.   TZ: Asia/Shanghai

  32. jobs:
  33.   build:
  34.     runs-on: ubuntu-20.04

  35.     steps:
  36.     - name: Checkout
  37.       uses: actions/checkout@main

  38.     - name: Initialization environment
  39.       env:
  40.         DEBIAN_FRONTEND: noninteractive
  41.       run: |
  42.         sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc
  43.         sudo -E apt-get -qq update
  44.         sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-2004)
  45.         sudo -E apt-get -qq autoremove --purge
  46.         sudo -E apt-get -qq clean
  47.         sudo timedatectl set-timezone "$TZ"
  48.         sudo mkdir -p /workdir
  49.         sudo chown $USER:$GROUPS /workdir

  50.     - name: Clone source code
  51.       working-directory: /workdir
  52.       run: |
  53.         df -hT $PWD
  54.         git clone $REPO_URL -b $REPO_BRANCH openwrt
  55.         ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt
  56.         
  57.     - name: Load custom feeds
  58.       run: |
  59.         [ -e $FEEDS_CONF ] && mv $FEEDS_CONF openwrt/feeds.conf.default
  60.         chmod +x $DIY_P1_SH
  61.         cd openwrt
  62.         $GITHUB_WORKSPACE/$DIY_P1_SH

  63.     - name: Update feeds
  64.       run: cd openwrt && ./scripts/feeds update -a

  65.     - name: Install feeds
  66.       run: cd openwrt && ./scripts/feeds install -a

  67.     - name: Load custom configuration
  68.       run: |
  69.         [ -e files ] && mv files openwrt/files
  70.         [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config
  71.         chmod +x $DIY_P2_SH
  72.         cd openwrt
  73.         $GITHUB_WORKSPACE/$DIY_P2_SH

  74.     - name: SSH connection to Actions
  75.       uses: P3TERX/ssh2actions@v1.0.0
  76.       if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh  != 'false') || contains(github.event.action, 'ssh')
  77.       env:
  78.         请不要发布这类群,谢谢_CHAT_ID: ${{ secrets.请不要发布这类群,谢谢_CHAT_ID }}
  79.         请不要发布这类群,谢谢_BOT_TOKEN: ${{ secrets.请不要发布这类群,谢谢_BOT_TOKEN }}

  80.     - name: Download package
  81.       id: package
  82.       run: |
  83.         cd openwrt
  84.         make defconfig
  85.         make download -j8
  86.         find dl -size -1024c -exec ls -l {} \;
  87.         find dl -size -1024c -exec rm -f {} \;

  88.     - name: Compile the firmware
  89.       id: compile
  90.       run: |
  91.         cd openwrt
  92.         echo -e "$(nproc) thread compile"
  93.         make -j$(nproc) || make -j1 || make -j1 V=s
  94.         echo "status=success" >> $GITHUB_OUTPUT
  95.         grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME
  96.         [ -s DEVICE_NAME ] && echo "DEVICE_NAME=_$(cat DEVICE_NAME)" >> $GITHUB_ENV
  97.         echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV

  98.     - name: Check space usage
  99.       if: (!cancelled())
  100.       run: df -hT

  101.     - name: Upload bin directory
  102.       uses: actions/upload-artifact@main
  103.       if: steps.compile.outputs.status == 'success' && env.UPLOAD_BIN_DIR == 'true'
  104.       with:
  105.         name: OpenWrt_bin${{ env.DEVICE_NAME }}${{ env.FILE_DATE }}
  106.         path: openwrt/bin

  107.     - name: Upload firmware directory
  108.       uses: actions/upload-artifact@main
  109.       if: steps.organize.outputs.status == 'success' && !cancelled()
  110.       with:
  111.         name: OpenWrt_firmware${{ env.DEVICE_NAME }}${{ env.FILE_DATE }}
  112.         path: ${{ env.FIRMWARE }}

  113.     - name: Upload firmware to cowtransfer
  114.       id: cowtransfer
  115.       if: steps.organize.outputs.status == 'success' && env.UPLOAD_COWTRANSFER == 'true' && !cancelled()
  116.       run: |
  117.         curl -fsSL git.io/file-transfer | sh
  118.         ./transfer cow --block 2621440 -s -p 64 --no-progress ${FIRMWARE} 2>&1 | tee cowtransfer.log
  119.         echo "::warning file=cowtransfer.com::$(cat cowtransfer.log | grep https)"
  120.         echo "::set-output name=url::$(cat cowtransfer.log | grep https | cut -f3 -d" ")"

  121.     - name: Upload firmware to WeTransfer
  122.       id: wetransfer
  123.       if: steps.organize.outputs.status == 'success' && env.UPLOAD_WETRANSFER == 'true' && !cancelled()
  124.       run: |
  125.         curl -fsSL git.io/file-transfer | sh
  126.         ./transfer wet -s -p 16 --no-progress ${FIRMWARE} 2>&1 | tee wetransfer.log
  127.         echo "::warning file=wetransfer.com::$(cat wetransfer.log | grep https)"
  128.         echo "::set-output name=url::$(cat wetransfer.log | grep https | cut -f3 -d" ")"

  129.     - name: Generate release tag
  130.       id: tag
  131.       if: env.UPLOAD_RELEASE == 'true' && !cancelled()
  132.       run: |
  133.         echo "::set-output name=release_tag::$(date +"%Y.%m.%d-%H%M")"
  134.         touch release.txt
  135.         [ $UPLOAD_COWTRANSFER = true ] && echo "? [Cowtransfer](${{ steps.cowtransfer.outputs.url }})" >> release.txt
  136.         [ $UPLOAD_WETRANSFER = true ] && echo "? [WeTransfer](${{ steps.wetransfer.outputs.url }})" >> release.txt
  137.         echo "::set-output name=status::success"

  138.     - name: Upload firmware to release
  139.       uses: softprops/action-gh-release@v1
  140.       if: steps.tag.outputs.status == 'success' && !cancelled()
  141.       env:
  142.         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  143.       with:
  144.         tag_name: ${{ steps.tag.outputs.release_tag }}
  145.         body_path: release.txt
  146.         files: ${{ env.FIRMWARE }}/*

  147.     - name: Delete workflow runs
  148.       uses: FunctionXJB/delete-workflow-runs@main
  149.       with:
  150.         retain_days: 1
  151.         keep_minimum_runs: 3

  152.     - name: Remove old Releases
  153.       uses: dev-drprasad/delete-older-releases@v0.1.0
  154.       if: env.UPLOAD_RELEASE == 'true' && !cancelled()
  155.       with:
  156.         keep_latest: 3
  157.         delete_tags: true
  158.       env:
  159.         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
复制代码

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

欢迎大家光临恩山无线论坛上一条 /1 下一条

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-5-8 22:53

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表