Skip to content

Commit

Permalink
workflows: Trigger revdeps on src/ changes
Browse files Browse the repository at this point in the history
  • Loading branch information
martinpitt committed Aug 1, 2023
1 parent ff6f5a8 commit 85c147d
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/trigger-revdeps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: revdeps
on: pull_request_target
jobs:
trigger:
runs-on: ubuntu-22.04
permissions:
issues: write
pull-requests: write
timeout-minutes: 5
env:
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}

steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Check if PR changes bridge or ws
id: check
run: |
set -ex
git fetch origin "${BASE_SHA}" "${HEAD_SHA}"
changes=$(git diff --name-only "${BASE_SHA}" "${HEAD_SHA}" -- src/)
if [ -n "${changes}" ]; then
echo "::set-output name=changed::true"
fi
- name: Trigger reverse dependency tests
if: steps.check.outputs.changed
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '/packit test --identifier revdeps'
})

0 comments on commit 85c147d

Please sign in to comment.