Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
nihaldivyam committed Apr 1, 2024
1 parent 76a7f57 commit 1d3ef98
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/dockerbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,18 @@ jobs:
**/Dockerfile
- name: Filter changed Dockerfiles
id: filter-changed-dockerfiles
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
done
should_build=false
for dockerfile in ${{ matrix.dockerfile }}; do
if [[ "${ALL_CHANGED_FILES}" == *"${dockerfile}"* ]]; then
should_build=true
break
fi
done
echo "::set-output name=should_build::$should_build"
- name: Log in to the Container registry
uses: docker/login-action@v3
Expand All @@ -64,10 +70,10 @@ jobs:
uses: docker/[email protected]
with:
images: ${{ matrix.image }}

- name: Build & push container image
id: docker_build
if: ${{ contains(startsWith(steps.changed-files.outputs.all_changed_files, './'), matrix.dockerfile) }}
if: steps.filter-changed-dockerfiles.outputs.should_build == 'true'
uses: docker/[email protected]
with:
context: .
Expand Down
2 changes: 1 addition & 1 deletion postgres-cloudnative-citus/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ RUN apt-get clean \
RUN usermod -u 26 postgres

# Set the user to run subsequent commands as
USER 26
USER 26

0 comments on commit 1d3ef98

Please sign in to comment.