Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Github] Make issue write workflow only run after success/failure #97341

Merged

Conversation

boomanaiden154
Copy link
Contributor

This patch makes the issue write workflow only run after success or failure of the workflow invoking it, preventing it from running where the original workflow was skipped.

Fixes #97294

This patch makes the issue write workflow only run after success or
failure of the workflow invoking it, preventing it from running where
the original workflow was skipped.

Fixes llvm#97294
@llvmbot
Copy link
Member

llvmbot commented Jul 1, 2024

@llvm/pr-subscribers-github-workflow

Author: Aiden Grossman (boomanaiden154)

Changes

This patch makes the issue write workflow only run after success or failure of the workflow invoking it, preventing it from running where the original workflow was skipped.

Fixes #97294


Full diff: https://github.com/llvm/llvm-project/pull/97341.diff

1 Files Affected:

  • (modified) .github/workflows/issue-write.yml (+5-1)
diff --git a/.github/workflows/issue-write.yml b/.github/workflows/issue-write.yml
index 616b323ad5fac..d4814a2fe9014 100644
--- a/.github/workflows/issue-write.yml
+++ b/.github/workflows/issue-write.yml
@@ -18,7 +18,11 @@ jobs:
     permissions:
       pull-requests: write
     if: >
-      github.event.workflow_run.event == 'pull_request'
+      github.event.workflow_run.event == 'pull_request' &&
+      (
+        github.event.workflow_run.conclusion == 'success' ||
+        github.event.workflow_run.conclusion == 'failure'
+      )
     steps:
       - name: 'Download artifact'
         uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1

Copy link
Collaborator

@tstellar tstellar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

Once #94011 is merged then I think it might make sense to do a follow up to skip this action if the artifact is missing. That seems a little more robust.

@boomanaiden154
Copy link
Contributor Author

Sounds good. I'll get to reviewing that one in a bit.

@boomanaiden154 boomanaiden154 merged commit da3e60b into llvm:main Jul 1, 2024
7 checks passed
@boomanaiden154 boomanaiden154 deleted the fix-issue-writepr-pr-release-note branch July 1, 2024 20:38
lravenclaw pushed a commit to lravenclaw/llvm-project that referenced this pull request Jul 3, 2024
…vm#97341)

This patch makes the issue write workflow only run after success or
failure of the workflow invoking it, preventing it from running where
the original workflow was skipped.

Fixes llvm#97294
kbluck pushed a commit to kbluck/llvm-project that referenced this pull request Jul 6, 2024
…vm#97341)

This patch makes the issue write workflow only run after success or
failure of the workflow invoking it, preventing it from running where
the original workflow was skipped.

Fixes llvm#97294
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Github] Run failed: Comment on an issue
3 participants