diff --git a/.github/workflows/get-changed-images.yaml b/.github/workflows/get-changed-images.yaml index 926b333..2a5459a 100644 --- a/.github/workflows/get-changed-images.yaml +++ b/.github/workflows/get-changed-images.yaml @@ -18,14 +18,14 @@ jobs: runs-on: ubuntu-latest outputs: addedOrModified: "${{ steps.changed-files.outputs.all_changed_and_modified_files_count > 0 }}" - addedOrModifiedImages: "${{ steps.changed-files.outputs.all_changed_files }}" + addedOrModifiedImages: "${{ steps.changed-containers.outputs.addedOrModifiedImages }}" steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Get changed images + - name: Get changed files id: changed-files uses: tj-actions/changed-files@v44 with: @@ -34,5 +34,16 @@ jobs: dir_names_max_depth: 2 matrix: true + - if: ${{ steps.changed-files.outputs.all_changed_and_modified_files_count > 0 }} + name: Determine changed images + id: changed-containers + shell: bash + run: | + IMAGES=$( \ + echo '${{ steps.changed-files.outputs.all_changed_and_modified_files }}' \ + | jq --raw-output 'map(sub("^images/"; "")) | join(",")' \ + ) + echo "addedOrModifiedImages=${IMAGES}" >> $GITHUB_OUTPUT + - name: List changed images - run: echo '${{ steps.changed-files.outputs.all_changed_files }}' \ No newline at end of file + run: echo '${{ steps.changed-containers.outputs.addedOrModifiedImages }}' \ No newline at end of file