Skip to content

Commit

Permalink
fix(action):
Browse files Browse the repository at this point in the history
now parameters are interpreted as is for the copy
  • Loading branch information
massimoschembri committed Jan 4, 2024
1 parent 85c7fdf commit fa1d14d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/test-local-action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit fa1d14d

Please sign in to comment.