mirror of
https://github.com/bitnami/containers.git
synced 2026-02-19 22:17:24 +08:00
[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:
13
.github/workflows/ci-pipeline.yml
vendored
13
.github/workflows/ci-pipeline.yml
vendored
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user