diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 575511d5..517abe03 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,9 @@ name: Safety Action Build And Publish on: push: - branches: [main] + tags: + - "^(\\d+\\.\\d+(\\.\\d+)?)$" + branches: [image-builds] env: DOCKER_BUILDKIT: 1 diff --git a/.github/workflows/gh-action-integration-matrix.json b/.github/workflows/gh-action-integration-matrix.json index 42bcaa5b..fe872276 100644 --- a/.github/workflows/gh-action-integration-matrix.json +++ b/.github/workflows/gh-action-integration-matrix.json @@ -1,3 +1,5 @@ [ - {"version": "2.3.4"} + {"version": "2.3.4"}, + {"version": "2.3.5"}, + {"version": ""} ] diff --git a/.github/workflows/test-insecure.yml b/.github/workflows/test-insecure.yml index b8aada7a..ee0e3dc1 100644 --- a/.github/workflows/test-insecure.yml +++ b/.github/workflows/test-insecure.yml @@ -4,7 +4,7 @@ name: Safety Action Insecure Tests on: push: - branches: [main, develop] + branches: [main, develop, image-ci] jobs: matrix: @@ -16,7 +16,7 @@ jobs: - id: set-matrix run: | TASKS=$(echo $(cat .github/workflows/gh-action-integration-matrix.json) | sed 's/ //g' ) - echo "::set-output name=matrix::$TASKS" + echo "matrix=$TASKS" >> $GITHUB_OUTPUT ##### Auto mode tests ### File scanning diff --git a/.github/workflows/test-secure.yml b/.github/workflows/test-secure.yml index 780127df..d52bf8a6 100644 --- a/.github/workflows/test-secure.yml +++ b/.github/workflows/test-secure.yml @@ -5,7 +5,7 @@ name: Safety Action Secure Tests on: push: - branches: [main, develop] + branches: [main, develop, image-ci] jobs: matrix: @@ -17,7 +17,7 @@ jobs: - id: set-matrix run: | TASKS=$(echo $(cat .github/workflows/gh-action-integration-matrix.json) | sed 's/ //g' ) - echo "::set-output name=matrix::$TASKS" + echo "matrix=$TASKS" >> $GITHUB_OUTPUT ##### Auto mode tests ### File scanning diff --git a/entrypoint.sh b/entrypoint.sh index af62ea53..8008cf3a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -203,12 +203,11 @@ exec 5>&1 output=$(python -m safety check -r "${SAFETY_ACTION_REQUIREMENTS}" --output="${SAFETY_ACTION_OUTPUT_FORMAT}" ${SAFETY_ACTION_CONTINUE_ON_ERROR} ${SAFETY_ACTION_ARGS} | tee >(cat - >&5)) exit_code=$? -# https://github.community/t/set-output-truncates-multiline-strings/16852/3 -output="${output//'%'/'%25'}" -output="${output//$'\n'/'%0A'}" -output="${output//$'\r'/'%0D'}" +echo "exit-code=$exit_code" >> $GITHUB_OUTPUT -echo "::set-output name=exit-code::$exit_code" -echo "::set-output name=cli-output::$output" +EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) +echo "cli-output<<$EOF" >> $GITHUB_OUTPUT +echo "$output" >> $GITHUB_OUTPUT +echo "$EOF" >> $GITHUB_OUTPUT exit $exit_code