From fa1d14d7bce0043e18c53ac7a87a56b0011d58de Mon Sep 17 00:00:00 2001 From: Massimo Schembri Date: Thu, 4 Jan 2024 09:29:44 +0100 Subject: [PATCH] fix(action): now parameters are interpreted as is for the copy --- .github/workflows/test-local-action.yaml | 26 ++++++++++++------------ action.yml | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test-local-action.yaml b/.github/workflows/test-local-action.yaml index 35100d6..ab2f7fc 100644 --- a/.github/workflows/test-local-action.yaml +++ b/.github/workflows/test-local-action.yaml @@ -40,6 +40,18 @@ jobs: tag_minor: ${{ steps.local-action.outputs.tag_minor }} tag_patch: ${{ steps.local-action.outputs.tag_patch }} + print_results: + runs-on: ubuntu-latest + name: Print test results + needs: [local_test_lasttag, local_test_fixed] + steps: + - run: | + echo "local_test_lasttag: ${{ needs.local_test_lasttag.outputs.used_tag }},${{ needs.local_test_lasttag.outputs.used_latest }}" + echo "local_test_fixed: ${{ needs.local_test_fixed.outputs.used_tag }},${{ needs.local_test_fixed.outputs.used_latest }}" + echo "semver_fixed: ${{ needs.local_test_fixed.outputs.tag_major }}, ${{ needs.local_test_fixed.outputs.tag_minor }}, ${{ needs.local_test_fixed.outputs.tag_patch }}" + echo "semver_lasttag: ${{ needs.local_test_lasttag.outputs.tag_major }}, ${{ needs.local_test_lasttag.outputs.tag_minor }}, ${{ needs.local_test_lasttag.outputs.tag_patch }}" + shell: bash + local_test_upstream_remove_files: runs-on: ubuntu-latest name: Test local action with upstream_remove_files set @@ -76,21 +88,9 @@ jobs: local_patch_dir: tests/sysdiglabs/kube-psp-advisor upstream_ref: master upstream_copy: | - generator tests/ + generator/* tests/ - name: Assert that files are copied id: test-copy run: |- [[ -f tests/generator.go ]] && [[ -f tests/generator_test.go ]] shell: bash - - print_results: - runs-on: ubuntu-latest - name: Print test results - needs: [local_test_lasttag, local_test_fixed] - steps: - - run: | - echo "local_test_lasttag: ${{ needs.local_test_lasttag.outputs.used_tag }},${{ needs.local_test_lasttag.outputs.used_latest }}" - echo "local_test_fixed: ${{ needs.local_test_fixed.outputs.used_tag }},${{ needs.local_test_fixed.outputs.used_latest }}" - echo "semver_fixed: ${{ needs.local_test_fixed.outputs.tag_major }}, ${{ needs.local_test_fixed.outputs.tag_minor }}, ${{ needs.local_test_fixed.outputs.tag_patch }}" - echo "semver_lasttag: ${{ needs.local_test_lasttag.outputs.tag_major }}, ${{ needs.local_test_lasttag.outputs.tag_minor }}, ${{ needs.local_test_lasttag.outputs.tag_patch }}" - shell: bash diff --git a/action.yml b/action.yml index 115df35..5ccdfaa 100644 --- a/action.yml +++ b/action.yml @@ -120,5 +120,5 @@ runs: SRC=$(echo "$mapping" | awk '{print $1}') DST=$(echo "$mapping" | awk '{print $2}') echo Copying from ${SRC} to ${DST} - cp -Rv upstream/${SRC}/* "${DST}/" + cp -Rv upstream/${SRC} "${DST}" done