CI: use SDK depending on destination branch
authorPaul Spooren <mail@aparcar.org>
Sun, 27 Dec 2020 23:13:45 +0000 (13:13 -1000)
committerPaul Spooren <mail@aparcar.org>
Tue, 29 Dec 2020 01:45:03 +0000 (15:45 -1000)
Not only use snapshot SDKs for master test but whatever destination
branch is used.

Signed-off-by: Paul Spooren <mail@aparcar.org>
.github/workflows/multi-arch-test-build.yml

index 11cbc809616a2d00113bb802eaf1a886104271d2..a2cbf8bc45bbf0b86d2065de17c53758d8d78b79 100644 (file)
@@ -2,8 +2,6 @@ name: Test Build
 
 on:
   pull_request:
-    branches:
-      - master
 
 jobs:
   build:
@@ -48,10 +46,16 @@ jobs:
           echo "Building $PACKAGES"
           echo "PACKAGES=$PACKAGES" >> $GITHUB_ENV
 
+      - name: Determine branch name
+        run: |
+          BRANCH="${GITHUB_BASE_REF#refs/heads/}"
+          echo "Building for $BRANCH"
+          echo "BRANCH=$BRANCH" >> $GITHUB_ENV
+
       - name: Build
         uses: openwrt/gh-action-sdk@v1
         env:
-          ARCH: ${{ matrix.arch }}
+          ARCH: ${{ matrix.arch }}-${{ env.BRANCH }}
           FEEDNAME: packages_ci
 
       - name: Move created packages to project dir