Skip to content

Commit

Permalink
added comment to wait for build
Browse files Browse the repository at this point in the history
  • Loading branch information
aali309 committed Nov 1, 2023
1 parent 90045cc commit edc1af6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/cryostat-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ jobs:
username: ${{ github.event.comment.user.login }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: pull cryostat image
id: pull-image
run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }}
- name: tag cryostat image
run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/cryostat/cryostat
Expand Down Expand Up @@ -126,6 +127,20 @@ jobs:
repo: context.repo.repo,
body: body
})
- name: Leave a comment on pull failure
uses: actions/github-script@v6
if: always() && steps.pull-image.outcome != 'success'
with:
script: |
const body = `Image does not exist! Please wait for the initial build and push to complete before using \`/build_test\` command.`;
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: body
})
- name: Set latest commit status as ${{ job.status }}
uses: myrotvorets/set-commit-status-action@master
if: always()
Expand Down

0 comments on commit edc1af6

Please sign in to comment.