mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-23 09:20:20 +08:00
test matrix
This commit is contained in:
parent
bcfb84375f
commit
94980a7531
6
.github/workflows/docker.yml
vendored
6
.github/workflows/docker.yml
vendored
@ -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
|
||||
|
@ -1,6 +1,4 @@
|
||||
# This file can running at actions
|
||||
|
||||
|
||||
# modify time: 202312110819, you can modify here to trigger Docker Build action
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user