kiddin9 4 年之前
父節點
當前提交
d07643ad9c
共有 1 個文件被更改,包括 13 次插入0 次删除
  1. 13 0
      .github/workflows/repo-dispatcher.yml

+ 13 - 0
.github/workflows/repo-dispatcher.yml

@@ -35,6 +35,18 @@ jobs:
         workflow_id: 4439867
         access_token: ${{ github.token }}
 
+    - name: Checkout
+      uses: actions/checkout@main
+
+    - name: Load Settings.ini
+      run: |
+        source "${GITHUB_WORKSPACE}/devices/common/settings.ini"
+        if [ -f "devices/${{matrix.target}}/settings.ini" ]; then
+          source "${GITHUB_WORKSPACE}/devices/${{matrix.target}}/settings.ini"
+        fi
+        echo "REPO_URL=${REPO_URL}" >> $GITHUB_ENV
+        echo "REPO_BRANCH=${REPO_BRANCH}" >> $GITHUB_ENV
+
     - name: Trigger Compile
       run: |
         sudo timedatectl set-timezone "$TZ"
@@ -55,6 +67,7 @@ jobs:
           -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
           -d '{"event_type": "nanopi-r4s ${{ env.SSH }}", "client_payload": {"target": "nanopi-r4s"}}'
         else
+          [ "$REPO_BRANCH" ] && exit 0;
           REPO_BRANCH_r=$(curl -s https://op.supes.top/firmware/x86_64/version.txt | tr "\r\n" "," | cut -f 3 -d ,)
           REPO_BRANCH="$(git ls-remote --tags git://github.com/openwrt/openwrt | cut -d/ -f3- | sort -t. -nk1,2 | awk '/^[^{]*$/{version=$1}END{print version}')"
             if [ $REPO_BRANCH_r != $REPO_BRANCH ]; then