From 75e292637e24dc88a4588aca3c701e41f964893e Mon Sep 17 00:00:00 2001 From: Fran Mulero Date: Wed, 5 Oct 2022 09:25:42 +0200 Subject: [PATCH] [bitnami/containers] Fix result check in automatic PRs (#8906) * [bitnami/containers] Fix result check in automatic PRs Signed-off-by: Fran Mulero * Change output name in the get-status step Signed-off-by: Fran Mulero * Use default result output https://github.com/actions/github-script#reading-step-results Signed-off-by: Fran Mulero * Use default result output https://github.com/actions/github-script#reading-step-results Signed-off-by: Fran Mulero Signed-off-by: Fran Mulero --- .github/workflows/ci-pipeline.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index d5cae8a80dbb..a1bebc4b454d 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -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 }}