-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change the permissions on the entrypoint file
- Loading branch information
1 parent
7a2e83d
commit 77a5deb
Showing
3 changed files
with
25 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
|
||
if [ -n "${GITHUB_WORKSPACE}" ]; then | ||
cd "${GITHUB_WORKSPACE}" || exit | ||
fi | ||
|
||
mkdir -p .sarif | ||
|
||
tfsec --format=sarif "${INPUT_WORKING_DIRECTORY}" >> .sarif/tfsec.sarif | ||
tfsec --format=sarif "${INPUT_WORKING_DIRECTORY}" > ${INPUT_SARIF_FILE} | ||
|
||
tfsec_return="${PIPESTATUS[0]}" exit_code=$? | ||
|
||
echo ::set-output name=tfsec-return-code::"${tfsec_return}" | ||
|
||
sh -c "git config --global user.name '${GITHUB_ACTOR}' \ | ||
&& git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com' \ | ||
&& git add -A && git commit -m '$*' --allow-empty \ | ||
&& git push -u origin HEAD" | ||
# echo "Input branch is ${INPUT_BRANCH}" | ||
|
||
# sh -c "git remote add origin ${INPUT_BRANCH} || git fetch --unshallow origin" | ||
|
||
# sh -c "git config --global user.name '${GITHUB_ACTOR}' \ | ||
# && git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com' \ | ||
# && git add .sarif/tfsec.sarif && git commit -m 'Updating tfsec.sarif file' --allow-empty \ | ||
# && git push -u origin HEAD:${INPUT_BRANCH} --force" | ||
|
||
exit $exit_code |