Skip to content

chore(deps): update actions/checkout action to v4 #24

chore(deps): update actions/checkout action to v4

chore(deps): update actions/checkout action to v4 #24

Workflow file for this run

name: build
on: ['pull_request']
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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/github-script@0.9.0
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
})