Skip to content

Commit

Permalink
remove prefix from changed files
Browse files Browse the repository at this point in the history
  • Loading branch information
lehmanju committed May 8, 2024
1 parent a9daed7 commit 52c6339
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/get-changed-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}'
run: echo '${{ steps.changed-containers.outputs.addedOrModifiedImages }}'

0 comments on commit 52c6339

Please sign in to comment.