From bac7f62bab19250274b8a7e2d0aad520efb18caf Mon Sep 17 00:00:00 2001 From: Miguel Fuertes Date: Fri, 19 Sep 2025 10:27:53 +0200 Subject: [PATCH] lots of changes --- .github/workflows/builder.yml | 52 ++++++++--------------------------- 1 file changed, 11 insertions(+), 41 deletions(-) diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml index c6401bb..5244701 100644 --- a/.github/workflows/builder.yml +++ b/.github/workflows/builder.yml @@ -11,9 +11,16 @@ on: options: - 'main' - 'openwrt-24.10' + diffconfig: + description: 'Configuration to use' + required: true + default: 'diffconfig' + type: choice + options: + - 'diffconfig' + - 'diffconfig_tailscale' env: - CONFIG_FILE: diffconfig UPLOAD_BIN_DIR: true UPLOAD_FIRMWARE: true UPLOAD_RELEASE: false @@ -38,20 +45,16 @@ jobs: sudo -E apt-get -qq autoremove --purge sudo -E apt-get -qq clean sudo timedatectl set-timezone "$TZ" - sudo mkdir -p /workdir - sudo chown $USER:$GROUPS /workdir - - name: Clone source code - working-directory: /workdir + - name: "Clone source code - Branch: ${{ inputs.openwrt_version }}" run: | df -hT $PWD echo "Cloning OpenWrt version: ${{ inputs.openwrt_version }}" git clone --depth=1 --branch "${{ inputs.openwrt_version }}" https://git.openwrt.org/openwrt/openwrt.git openwrt - ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt - name: Load msm89xx target and uz801 packages run: | - git apply --unsafe-paths --directory=/workdir enable_wcn36xx_mac80211.patch + git apply --unsafe-paths enable_wcn36xx_mac80211.patch mv msm89xx openwrt/target/linux/msm89xx mv packages openwrt/package/uz801 if [ "${{ inputs.openwrt_version }}" == "openwrt-24.10" ]; then @@ -67,7 +70,7 @@ jobs: - name: Load config run: | - [ -f $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config + [ -f ${{inputs.diffconfig}} ] && mv ${{inputs.diffconfig}} openwrt/.config - name: Download package id: package @@ -116,36 +119,3 @@ jobs: name: openwrt_firmware_${{ env.DEVICE_NAME }}_${{ env.FILE_DATE }} path: ${{ env.FIRMWARE }}/*.img - - name: Generate release tag - id: tag - if: env.UPLOAD_RELEASE == 'true' && !cancelled() - run: | - echo "release_tag=$(date +"%Y.%m.%d-%H%M")" >> $GITHUB_OUTPUT - touch release.txt - [ ${UPLOAD_GOFILE} = true && ${{ steps.gofile.outputs.url }} ] && echo "🔗 [GoFile](${{ steps.gofile.outputs.url }})" >> release.txt - echo "status=success" >> $GITHUB_OUTPUT - - - name: Upload firmware to release - uses: softprops/action-gh-release@v2 - if: steps.tag.outputs.status == 'success' && !cancelled() - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.tag.outputs.release_tag }} - body_path: release.txt - files: ${{ env.FIRMWARE }}/* - -# - name: Delete workflow runs -# uses: Mattraks/delete-workflow-runs@main -# with: -# retain_days: 0 -# keep_minimum_runs: 2 - -# - name: Remove old Releases -# uses: dev-drprasad/delete-older-releases@master -# if: env.UPLOAD_RELEASE == 'true' && !cancelled() -# with: -# keep_latest: 3 -# delete_tags: true -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}