From 143f4ba596c916eee9815fce5483011e5d7056f9 Mon Sep 17 00:00:00 2001 From: Christopher Fremond Date: Fri, 24 Nov 2023 18:15:43 +0000 Subject: [PATCH] test(workflow):test of trigger --- .github/workflows/ga-image-build-master.yml | 22 ++++++++++----------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ga-image-build-master.yml b/.github/workflows/ga-image-build-master.yml index 0b4483c..cb83a9c 100644 --- a/.github/workflows/ga-image-build-master.yml +++ b/.github/workflows/ga-image-build-master.yml @@ -46,19 +46,17 @@ jobs: username: ${{ secrets.USER_DOCKER_01EDU_ORG }} password: ${{ secrets.SECRET_DOCKER_01EDU_ORG }} - - name: postgres-db source code changes check - id: check-changes-1 - run: | - echo $(git diff --name-only --merge-base master -- srcs/postgres-db) - echo "changed_files=$(git diff --name-only --merge-base master -- srcs/postgres-db | xargs)" >> $GITHUB_OUTPUT - + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v40 + with: + path: './srcs/postgres-db' + # NOTE: `since_last_remote_commit: true` is implied by default and falls back to the previous local commit. - name: 🏗️ Build the 💻 postgres-db image - env: - CHANGED_FILES: ${{ steps.check-changes-1.outputs.changed_files }} + if: steps.changed-files-yaml.outputs.test_any_changed == 'true' run: | - echo "$CHANGED_FILES" - echo "$CHANGED_FILES" - echo "$CHANGED_FILES" - + for file in ${{ steps.changed-files.outputs.all_changed_files }}; do + echo "$file was changed" + done # docker build srcs/postgres-db/ --file srcs/postgres-db/Dockerfile --tag ghcr.io/01-edu/content-postgres-db # docker push ghcr.io/01-edu/content-postgres-db \ No newline at end of file