Skip to content

Commit

Permalink
5
Browse files Browse the repository at this point in the history
  • Loading branch information
Glutamat42 authored Oct 31, 2024
1 parent b1b4a57 commit 8581707
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/moodle-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,33 @@ jobs:

outputs:
include_list: ${{ steps.include_list.outputs.include_list }}

steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Define matrix
id: include_list
run: |
ls -lha
# Generates a json array with include entries for all possible combinations of PHP, Moodle branch and database
include_str="["
first_entry=true
for i in $(cat plugin_compatibility.json | jq -c '.[]'); do
moodle=$(echo "$i" | jq -r '.moodle')
for php in $(echo "$i" | jq -c '.PHP[]'); do
for database in pgsql mariadb; do
next_entry="{'php': '$php', 'moodle-branch': '$moodle', 'database': '$database', 'experimental': false}"
include_str="$include_str, $next_entry"
if [ "$first_entry" = true ]; then
first_entry=false
else
include_str="$include_str,"
fi
next_entry="{\"php\": \"$php\", \"moodle-branch\": \"$moodle\", \"database\": \"$database\", \"experimental\": false}"
include_str="$include_str$next_entry"
done
done
done
include_str="$include_str]"
echo "include_list=$include_str"
echo "include_list=$include_str" >> "$GITHUB_OUTPUT"
test:
runs-on: ubuntu-22.04

Expand Down

0 comments on commit 8581707

Please sign in to comment.