diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index d8a9853b..6c1c6921 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -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 @@ -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()