Skip to content

chore(deps): update actions/github-script action to v7 #27

chore(deps): update actions/github-script action to v7

chore(deps): update actions/github-script action to v7 #27

Workflow file for this run

name: build
on: ['pull_request']
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Execute OPA Tests
id: opa
run: |
result=$(docker run --rm --workdir /github/workspace \
-v $(pwd):/github/workspace \
openpolicyagent/opa:0.17.2 \
test policies/ -v || exit 0 )
result="${result//'%'/'%25'}"
result="${result//$'\n'/'%0A'}"
result="${result//$'\r'/'%0D'}"
echo "::set-output name=result::$result"
- uses: actions/[email protected]
if: github.event_name == 'pull_request'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const output = `#### OPA Test Validation 🖌 \`${{ steps.opa.outcome }}\`
<details><summary>Show OPA Test Validation Report</summary>
\`\`\`
${{ steps.opa.outputs.result }}
\`\`\`
</details>
*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`, Working Directory: \`.\`, Workflow: \`${{ github.workflow }}\`*`;
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
})