[bitnami/containers] Fix result check in automatic PRs (#8906)

* [bitnami/containers] Fix result check in automatic PRs

Signed-off-by: Fran Mulero <fmulero@vmware.com>

* Change output name in the get-status step

Signed-off-by: Fran Mulero <fmulero@vmware.com>

* Use default result output https://github.com/actions/github-script#reading-step-results

Signed-off-by: Fran Mulero <fmulero@vmware.com>

* Use default result output https://github.com/actions/github-script#reading-step-results

Signed-off-by: Fran Mulero <fmulero@vmware.com>

Signed-off-by: Fran Mulero <fmulero@vmware.com>
This commit is contained in:
Fran Mulero
2022-10-05 09:25:42 +02:00
committed by GitHub
parent eb45c5a002
commit 75e292637e

View File

@@ -114,11 +114,15 @@ jobs:
needs:
- get-containers
- vib-verify
outputs:
result: ${{ steps.get-status.outputs.result }}
if: ${{ always() }}
steps:
- name: Check Status
- id: get-status
name: Check Status
uses: actions/github-script@v6
with:
result-encoding: string
script: |
state = 'success'
description = 'Well done! Everything looks good. Please wait for the Bitnami Team review.'
@@ -150,6 +154,7 @@ jobs:
} catch (error) {
core.setFailed(error.message)
}
return state
auto-pr-review:
runs-on: ubuntu-latest
name: Reviewal for automated PRs
@@ -161,7 +166,7 @@ jobs:
github.event.pull_request.user.login == 'bitnami-bot'
steps:
- name: Enable auto-merge feature
if: ${{ needs.verification-summary.result == 'success' }}
if: ${{ needs.verification-summary.outputs.result == 'success' }}
uses: reitermarkus/automerge@v2.1.2
with:
# Necessary to trigger CD workflow
@@ -169,12 +174,12 @@ jobs:
merge-method: squash
pull-request: ${{ github.event.number }}
- name: PR Approval
if: ${{ needs.verification-summary.result == 'success' }}
if: ${{ needs.verification-summary.outputs.result == 'success' }}
uses: hmarr/auto-approve-action@v2.4.0
with:
pull-request-number: ${{ github.event.number }}
- name: Manual review required
if: ${{ needs.verification-summary.result != 'success' }}
if: ${{ needs.verification-summary.outputs.result != 'success' }}
uses: peter-evans/create-or-update-comment@v2.0.0
with:
issue-number: ${{ github.event.number }}