From b801fd6bd34443cb8fc2055e48434656e0172b22 Mon Sep 17 00:00:00 2001 From: Mark Do Date: Wed, 7 Feb 2024 22:48:58 +0000 Subject: [PATCH] testing output variables --- .../docker_context/docker_context.sh | 2 +- .github/workflows/temp_ci_test.yml | 74 +++++++++---------- src/action/test.txt | 2 +- src/interfacing/test2.txt | 2 +- 4 files changed, 40 insertions(+), 40 deletions(-) diff --git a/.github/templates/docker_context/docker_context.sh b/.github/templates/docker_context/docker_context.sh index bdb278a8..d9a60f8f 100755 --- a/.github/templates/docker_context/docker_context.sh +++ b/.github/templates/docker_context/docker_context.sh @@ -42,7 +42,7 @@ done <<< "$modules" # Convert the array of JSON objects to a single JSON array json_services=$(jq -nc '[( $ARGS.positional[] | fromjson )]' --args -- ${json_objects[*]}) -echo "docker_matrix=$(echo $json_services | jq -c '{include: .}')" >> #$GITHUB_OUTPUT +echo "docker_matrix=$(echo $json_services | jq -c '{include: .}')" >> $GITHUB_OUTPUT ################# Setup Docker Registry and Repository Name ################# # Docker Registry to pull/push images diff --git a/.github/workflows/temp_ci_test.yml b/.github/workflows/temp_ci_test.yml index 01e32b03..dede9d5b 100644 --- a/.github/workflows/temp_ci_test.yml +++ b/.github/workflows/temp_ci_test.yml @@ -16,7 +16,7 @@ jobs: name: Get changed files outputs: - modified_modules: ${{ steps.report-changes.outputs.CHANGED_MODULES }} + modified_modules: ${{ steps.report-changes.outputs.testvar }} steps: - uses: actions/checkout@v4 @@ -101,45 +101,45 @@ jobs: modified_modules: ${{ env.CHANGED_MODULES }} run: | echo "CHANGED_MODULES: ${{ env.CHANGED_MODULES }}" - echo "CHANGED_MODULES=$CHANGED_MODULES" >> $GITHUB_ENV + echo "testvar=$CHANGED_MODULES" >> $GITHUB_ENV - name: Sanity check run: | - echo 1 ${{ steps.report-changes.outputs.CHANGED_MODULES }} + echo 1 ${{ steps.world_modeling.outputs.CHANGED_MODULES }} echo 2 ${{ env.CHANGED_MODULES }} setup-environment: - name: Setup environment - runs-on: ubuntu-latest - needs: get_changed_modules - - env: - modified_modules: ${{ needs.get_changed_modules.outputs.modified_modules }} - - outputs: - docker_matrix: ${{ steps.docker-environment.outputs.docker_matrix }} - registry: ${{ steps.docker-environment.outputs.registry }} - repository: ${{ steps.docker-environment.outputs.repository }} - source_branch: ${{ steps.github-environment.outputs.source_branch }} - target_branch: ${{ steps.github-environment.outputs.target_branch }} - - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - - name: Setup Watod Environment - run: ./watod_scripts/watod-setup-env.sh - shell: bash - - - name: Check module changes - run: echo "changed is ${{ env.modified_modules }}" - - - name: Generate Docker Environment - id: docker-environment - uses: "./.github/templates/docker_context" - with: - modified_modules: ${{ env.modified_modules }} - - - name: Generate GitHub Environment - id: github-environment - uses: "./.github/templates/github_context" \ No newline at end of file + name: Setup environment + runs-on: ubuntu-latest + needs: get_changed_modules + + env: + modified_modules: ${{ needs.get_changed_modules.outputs.modified_modules }} + + outputs: + docker_matrix: ${{ steps.docker-environment.outputs.docker_matrix }} + registry: ${{ steps.docker-environment.outputs.registry }} + repository: ${{ steps.docker-environment.outputs.repository }} + source_branch: ${{ steps.github-environment.outputs.source_branch }} + target_branch: ${{ steps.github-environment.outputs.target_branch }} + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Setup Watod Environment + run: ./watod_scripts/watod-setup-env.sh + shell: bash + + - name: Check module changes + run: echo "changed is ${{ env.modified_modules }}" + + - name: Generate Docker Environment + id: docker-environment + uses: "./.github/templates/docker_context" + with: + modified_modules: ${{ env.modified_modules }} + + - name: Generate GitHub Environment + id: github-environment + uses: "./.github/templates/github_context" \ No newline at end of file diff --git a/src/action/test.txt b/src/action/test.txt index e440e5c8..56a6051c 100644 --- a/src/action/test.txt +++ b/src/action/test.txt @@ -1 +1 @@ -3 \ No newline at end of file +1 \ No newline at end of file diff --git a/src/interfacing/test2.txt b/src/interfacing/test2.txt index f11c82a4..56a6051c 100644 --- a/src/interfacing/test2.txt +++ b/src/interfacing/test2.txt @@ -1 +1 @@ -9 \ No newline at end of file +1 \ No newline at end of file