Skip to content

Commit

Permalink
fix(ci): run cleanup only on pull requests
Browse files Browse the repository at this point in the history
This commit fixes the issue where the cleanup job from the mock_acpi workflow was running
on any comment to issue or PR. Ideally, it should only run how other jobs in the workflow gets triggered.

Signed-off-by: Vibhu Prashar <[email protected]>
  • Loading branch information
vprashar2929 committed Sep 13, 2024
1 parent ea93777 commit d13d50b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/mock_acpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
if: github.event.issue.pull_request && github.event.comment.body == '/test-acpi'
name: Test Mock ACPI
needs: [initalize-workflow, create-runner]
continue-on-error: true
runs-on: self-hosted
outputs:
runner-name: ${{ runner.name }}
Expand Down Expand Up @@ -87,7 +88,7 @@ jobs:
ansible-playbook -vv -i inventory.yaml mock_acpi_playbook.yaml -e "pr_number=${{ github.event.issue.number }}"
cleanup:
if: ${{ always() }}
if: github.event.issue.pull_request && github.event.comment.body == '/test-acpi'
name: Cleanup
needs: [initalize-workflow, test-mock-acpi]
runs-on: ubuntu-latest
Expand Down

0 comments on commit d13d50b

Please sign in to comment.