mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-04-16 09:37:53 +00:00
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
39 lines
1.5 KiB
YAML
39 lines
1.5 KiB
YAML
name: Prowler - Merged Pull Request
|
|
|
|
on:
|
|
pull_request_target:
|
|
branches: ['master']
|
|
types: ['closed']
|
|
|
|
jobs:
|
|
trigger-cloud-pull-request:
|
|
name: Trigger Cloud Pull Request
|
|
if: github.event.pull_request.merged == true && github.repository == 'prowler-cloud/prowler'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
ref: ${{ github.event.pull_request.merge_commit_sha }}
|
|
|
|
- name: Set short git commit SHA
|
|
id: vars
|
|
run: |
|
|
shortSha=$(git rev-parse --short ${{ github.event.pull_request.merge_commit_sha }})
|
|
echo "SHORT_SHA=${shortSha}" >> $GITHUB_ENV
|
|
|
|
- name: Trigger pull request
|
|
uses: peter-evans/repository-dispatch@5fc4efd1a4797ddb68ffd0714a238564e4cc0e6f # v4.0.0
|
|
with:
|
|
token: ${{ secrets.PROWLER_BOT_ACCESS_TOKEN }}
|
|
repository: ${{ secrets.CLOUD_DISPATCH }}
|
|
event-type: prowler-pull-request-merged
|
|
client-payload: |
|
|
{
|
|
"PROWLER_COMMIT_SHA": "${{ github.event.pull_request.merge_commit_sha }}",
|
|
"PROWLER_COMMIT_SHORT_SHA": "${{ env.SHORT_SHA }}",
|
|
"PROWLER_PR_TITLE": ${{ toJson(github.event.pull_request.title) }},
|
|
"PROWLER_PR_LABELS": ${{ toJson(github.event.pull_request.labels.*.name) }},
|
|
"PROWLER_PR_BODY": ${{ toJson(github.event.pull_request.body) }},
|
|
"PROWLER_PR_URL": ${{ toJson(github.event.pull_request.html_url) }}
|
|
}
|