Skip to content

Commit

Permalink
ci: refactor combined workflow variable passing
Browse files Browse the repository at this point in the history
  • Loading branch information
defanator committed Oct 27, 2024
1 parent 948ea14 commit 34814f1
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,25 @@ on:
required: true
default: "auto"

env:
OPENWRT_VERSION: ${{ inputs.openwrt_version || '23.05.3' }}
OPENWRT_ARCH: ${{ inputs.openwrt_arch || 'mips_24kc' }}
OPENWRT_TARGET: ${{ inputs.openwrt_target || 'ath79' }}
OPENWRT_SUBTARGET: ${{ inputs.openwrt_target || 'generic' }}
OPENWRT_VERMAGIC: ${{ inputs.openwrt_target || 'auto' }}

jobs:
build:
name: "v${{ matrix.build_env.tag }} - ${{ matrix.build_env.pkgarch }} :: ${{ matrix.build_env.target }}/${{ matrix.build_env.subtarget }} openwrt build"
runs-on: ubuntu-22.04
strategy:
matrix:
build_env:
- tag: ${{ inputs.openwrt_version }}
pkgarch: ${{ inputs.openwrt_arch }}
target: ${{ inputs.openwrt_target }}
subtarget: ${{ inputs.openwrt_subtarget }}
vermagic: ${{ inputs.openwrt_vermagic }}
- tag: ${{ env.OPENWRT_VERSION }}
pkgarch: ${{ env.OPENWRT_ARCH }}
target: ${{ env.OPENWRT_TARGET }}
subtarget: ${{ env.OPENWRT_SUBTARGET }}
vermagic: ${{ env.OPENWRT_VERMAGIC }}

env:
OPENWRT_RELEASE: ${{ matrix.build_env.tag }}
Expand Down

0 comments on commit 34814f1

Please sign in to comment.