Skip to content

feature/angular: update dependencies #185

feature/angular: update dependencies

feature/angular: update dependencies #185

Workflow file for this run

name: Test images
on:
pull_request:
jobs:
setup:
name: Setup
permissions:
contents: read
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v5
with: { fetch-depth: 0 }
- name: Fetch base and head
run: |
git fetch origin ${{ github.base_ref }}:${{ github.base_ref }}
git fetch origin ${{ github.head_ref }}:${{ github.head_ref }}
- name: Load config
id: config
env:
BASE: ${{ github.base_ref }}
HEAD: ${{ github.head_ref }}
run: |
python3 <<EOF >> $GITHUB_OUTPUT
from os import environ as env
import json
import re
import subprocess
cmd = ["git", "diff", "--name-only", f"{env['BASE']}...{env['HEAD']}"]
changes = subprocess.check_output(cmd).decode('utf-8').strip().split("\n")
images = list(set([
g["image"]
for c in changes
if (g := re.search("^images/src/(?P<image>[^/]+)/", c))
]))
print(f"images={json.dumps(images)}")
EOF
outputs:
images: ${{ steps.config.outputs.images }}
test:
name: Test image
needs: setup
if: ${{ needs.setup.outputs.images != '' && toJson(fromJson(needs.setup.outputs.images)) != '[]' }}
strategy:
matrix:
image: ${{ fromJSON(needs.setup.outputs.images) }}
uses: ./.github/workflows/test-image.yaml
with:
image: ${{ matrix.image }}
done:
name: Test images
needs: test
runs-on: ubuntu-24.04
steps:
- name: No op
run: exit 0