mirror of
https://github.com/bitnami/containers.git
synced 2026-03-14 14:58:01 +08:00
[bitnami/*] Fix verification summary (#7079)
* Change bash script per node script Signed-off-by: Fran Mulero <fmulero@vmware.com> * Use github-script to set status Signed-off-by: Fran Mulero <fmulero@vmware.com> * Change action name, and clean the code Signed-off-by: Fran Mulero <fmulero@vmware.com> * Change action name, and clean the code Signed-off-by: Fran Mulero <fmulero@vmware.com> * Update .github/workflows/ci-pipeline.yml Co-authored-by: Francisco de Paz Galan <fdepaz@vmware.com> Signed-off-by: Fran Mulero <fmulero@vmware.com> Signed-off-by: Fran Mulero <fmulero@vmware.com> Co-authored-by: Francisco de Paz Galan <fdepaz@vmware.com>
This commit is contained in:
56
.github/workflows/ci-pipeline.yml
vendored
56
.github/workflows/ci-pipeline.yml
vendored
@@ -10,6 +10,7 @@ on: # rebuild any PRs and main branch changes
|
|||||||
permissions:
|
permissions:
|
||||||
issues: write
|
issues: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
statuses: write
|
||||||
env:
|
env:
|
||||||
CSP_API_URL: https://console.cloud.vmware.com
|
CSP_API_URL: https://console.cloud.vmware.com
|
||||||
CSP_API_TOKEN: ${{ secrets.CSP_API_TOKEN }}
|
CSP_API_TOKEN: ${{ secrets.CSP_API_TOKEN }}
|
||||||
@@ -109,31 +110,46 @@ jobs:
|
|||||||
verification-summary:
|
verification-summary:
|
||||||
# Ensure all containers passed the verification
|
# Ensure all containers passed the verification
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Verification Summary
|
name: Check Matrix Outcome
|
||||||
needs:
|
needs:
|
||||||
- get-containers
|
- get-containers
|
||||||
- vib-verify
|
- vib-verify
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
steps:
|
steps:
|
||||||
- name: Verification Summary
|
- name: Check Status
|
||||||
run: |
|
uses: actions/github-script@v6
|
||||||
if [[ "${{ needs.get-containers.result }}" != "success" ]]; then
|
with:
|
||||||
echo "Verification is required."
|
script: |
|
||||||
echo "If you've just created this PR, don't worry about this message. Bitnami Team has to review it and make the verification possible."
|
state = 'success'
|
||||||
exit 1
|
description = 'Well done! Everything looks good. Please wait for the Bitnami Team review.'
|
||||||
else
|
if ("${{ needs.get-containers.result }}" != "success" ) {
|
||||||
if [[ "${{ needs.get-containers.outputs.result }}" == "skip" ]]; then
|
description = "If you've just created this PR, don't worry about this message. The Bitnami Team has to review it and make the verification possible."
|
||||||
echo "It seems these changes don't involve any container"
|
core.warning(description)
|
||||||
else
|
state = 'pending'
|
||||||
if [[ "${{ needs.vib-verify.result }}" != "success" ]]; then
|
} else if ("${{ needs.get-containers.outputs.result }}" == "skip" ) {
|
||||||
echo "Verification is required"
|
description = "It seems these changes don't involve any container"
|
||||||
echo "Please review previous jobs to get more information"
|
core.warning(description)
|
||||||
exit 1
|
} else if ("${{ needs.vib-verify.result }}" != "success" ) {
|
||||||
else
|
description = "Please review previous jobs to get more information"
|
||||||
echo "Well done! Everything looks good. Please wait for the Bitnami Team review."
|
core.error(description)
|
||||||
fi
|
state = 'error'
|
||||||
fi
|
} else {
|
||||||
fi
|
core.notice(description)
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
await github.rest.repos.createCommitStatus({
|
||||||
|
context: `${context.workflow} / Verification Summary (${context.eventName})`,
|
||||||
|
owner: context.payload.repository.owner.login,
|
||||||
|
repo: context.payload.repository.name,
|
||||||
|
sha: context.payload.pull_request.head.sha,
|
||||||
|
target_url: `${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}`,
|
||||||
|
description: description,
|
||||||
|
state: state
|
||||||
|
})
|
||||||
|
core.info(`Updated build status: ${state}`)
|
||||||
|
} catch (error) {
|
||||||
|
core.setFailed(error.message)
|
||||||
|
}
|
||||||
auto-pr-review:
|
auto-pr-review:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Reviewal for automated PRs
|
name: Reviewal for automated PRs
|
||||||
|
|||||||
Reference in New Issue
Block a user