test matrix

This commit is contained in:
Darren 2023-12-11 08:45:18 +08:00 committed by GitHub
parent bcfb84375f
commit 94980a7531
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -13,7 +13,7 @@ on:
paths:
- "docker/*/Dockerfile"
env:
matrix: ""
MATRIX: '{}'
jobs:
setup:
@ -30,7 +30,7 @@ jobs:
changed_files=$(git diff --name-only HEAD^ HEAD)
app_list=$(echo "$changed_files" | grep -E 'docker/.*/(Dockerfile)' | awk -F'/' '{print $2}' | sort | uniq)
app_list_json=$(echo $app_list | jq -R -s -c 'split(" ")')
echo "matrix={\"app\": $app_list_json}" >> $GITHUB_ENV
echo "MATRIX={\"app\": $app_list_json}" >> $GITHUB_ENV
build:
needs: setup
@ -39,7 +39,7 @@ jobs:
# You can set it to choice where download from
MEDIA_FROM: "source"
strategy:
matrix: $matrix
matrix: ${{ fromJson(env.MATRIX) }}
steps:
- name: Checkout code
uses: actions/checkout@v3

View File

@ -1,6 +1,4 @@
# This file can running at actions
# modify time: 202312110819, you can modify here to trigger Docker Build action