diff --git a/.github/workflows/test-changes-exists-drift.yml b/.github/workflows/test-changes-exists-drift.yml index a25922f8..5d9cf8c3 100644 --- a/.github/workflows/test-changes-exists-drift.yml +++ b/.github/workflows/test-changes-exists-drift.yml @@ -66,7 +66,11 @@ jobs: actual: "${{ needs.test.outputs.result }}" - name: Download Artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 + with: + path: metadata + pattern: metadata-* + merge-multiple: true - name: Display structure of downloaded files id: metadata diff --git a/.github/workflows/test-failed-plan-drift.yml b/.github/workflows/test-failed-plan-drift.yml index fc166b2e..a3cf64cc 100644 --- a/.github/workflows/test-failed-plan-drift.yml +++ b/.github/workflows/test-failed-plan-drift.yml @@ -66,7 +66,11 @@ jobs: actual: "${{ needs.test.outputs.result }}" - name: Download Artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 + with: + path: metadata + pattern: metadata-* + merge-multiple: true - name: Display structure of downloaded files id: metadata diff --git a/.github/workflows/test-no-changes-drift-more.yml b/.github/workflows/test-no-changes-drift-more.yml index ea81e1ce..b436a9f4 100644 --- a/.github/workflows/test-no-changes-drift-more.yml +++ b/.github/workflows/test-no-changes-drift-more.yml @@ -70,7 +70,11 @@ jobs: time: '30s' - name: Download Artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 + with: + path: metadata + pattern: metadata-* + merge-multiple: true - name: Display structure of downloaded files id: metadata diff --git a/.github/workflows/test-no-changes.yml b/.github/workflows/test-no-changes.yml index 7b94b28d..56bd7064 100644 --- a/.github/workflows/test-no-changes.yml +++ b/.github/workflows/test-no-changes.yml @@ -64,7 +64,11 @@ jobs: actual: "${{ needs.test.outputs.result }}" - name: Download Artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 + with: + path: metadata + pattern: metadata-* + merge-multiple: true - name: Display structure of downloaded files id: metadata diff --git a/.github/workflows/test-settings-action-disabled-drift.yml b/.github/workflows/test-settings-action-disabled-drift.yml index 7763a87f..be9d6df3 100644 --- a/.github/workflows/test-settings-action-disabled-drift.yml +++ b/.github/workflows/test-settings-action-disabled-drift.yml @@ -65,7 +65,11 @@ jobs: actual: "${{ needs.test.outputs.result }}" - name: Download Artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 + with: + path: metadata + pattern: metadata-* + merge-multiple: true - name: Display structure of downloaded files id: metadata diff --git a/.github/workflows/test-settings-action-disabled.yml b/.github/workflows/test-settings-action-disabled.yml index 936913a0..6bc59389 100644 --- a/.github/workflows/test-settings-action-disabled.yml +++ b/.github/workflows/test-settings-action-disabled.yml @@ -64,7 +64,11 @@ jobs: actual: "${{ needs.test.outputs.result }}" - name: Download Artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 + with: + path: metadata + pattern: metadata-* + merge-multiple: true - name: Display structure of downloaded files id: metadata diff --git a/action.yml b/action.yml index 70538de8..4cee8f14 100644 --- a/action.yml +++ b/action.yml @@ -401,11 +401,19 @@ runs: echo "result=\"\"" >> $GITHUB_OUTPUT fi + - name: Generate a unique id + id: generate + shell: bash + run: | + echo "rand=$(openssl rand -hex 5)" >> "$GITHUB_OUTPUT" + - name: Upload Artifacts if: ${{ steps.atmos-github-actions-enabled.outputs.value == 'true' && inputs.drift-detection-mode-enabled == 'true' }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: metadata + # The name of the artifact needs to be unique for every job run! + # This name is filtered in cloudposse/github-action-atmos-terraform-drift-detection by the "metadata-*" prefix + name: metadata-${{ github.run_id }}-${{ steps.generate.outputs.rand }} path: metadata retention-days: ${{ inputs.metadata-retention-days }}