Skip to content

Commit

Permalink
again
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros-k committed May 10, 2024
1 parent 7465c34 commit c0306aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
5 changes: 3 additions & 2 deletions .github/scripts/changed_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
# Parse the json
changed_files = json.loads(json_files)

matrix = []
result = {}
for file in changed_files:
match = APP_REGEX.match(file)
Expand All @@ -53,11 +54,11 @@
],
}

matrix.append(result[full_name])
print(
f"Detected changed item for {full_name}: {json.dumps(result[full_name], indent=2)}",
file=sys.stderr,
)


print(json.dumps(result), file=sys.stderr)
print(json.dumps(result))
print(json.dumps({"include": matrix}))
19 changes: 3 additions & 16 deletions .github/workflows/install-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get changed files
id: changed-files-json
uses: tj-actions/changed-files@v44
Expand All @@ -23,35 +24,20 @@ jobs:
with:
python-version: "3.11"

# - name: Setup Go
# uses: actions/setup-go@v4
# with:
# go-version: "1.22.2"
- name: Get changed apps
id: changed-apps
env:
CHANGED_FILES: ${{ steps.changed-files-json.outputs.all_changed_files }}
run: |
out=$(python3 .github/scripts/changed_apps.py)
echo "changed-apps=${out}" >> $GITHUB_OUTPUT
echo "$out"
# - name: Get changed apps
# id: changed-apps
# env:
# CHANGED_FILES: ${{ steps.changed-files-json.outputs.all_changed_files }}
# run: |
# echo $CHANGED_FILES
# out=$(go run ./tools/get-changed-apps/cmd/main.go)
# echo "changed-apps=${out}" >> $GITHUB_OUTPUT
# echo $out
test-apps:
name: Test apps
needs: changed-files
runs-on: ubuntu-latest
strategy:
matrix: ${{ needs.changed-files.outputs.changed-apps }}
matrix: ${{ fromJson(needs.changed-files.outputs.changed-apps) }}
steps:
- name: Environment Information
run: |
Expand All @@ -60,6 +46,7 @@ jobs:
echo "========================="
- name: Checkout
uses: actions/checkout@v4

- name: Run app
shell: bash
run: |
Expand Down

0 comments on commit c0306aa

Please sign in to comment.