Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
- Validate PR - Skip validation for PRs with fewer than 100 lines changed, excluding common lock files (`Cargo.lock`, `yarn.lock`, `package-lock.json`, `Pipfile.lock`, etc.). Tiny PRs no longer go through the issue-discussion loop.
- Add validate-pr composite action for validating non-maintainer PRs against contribution guidelines ([#153](https://github.com/getsentry/github-workflows/pull/153))

### Fixes

- Updater - Trigger CI for new PRs without changelog updates ([#166](https://github.com/getsentry/github-workflows/pull/166))

## 3.3.0

### Features
Expand Down
29 changes: 29 additions & 0 deletions updater/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -462,3 +462,32 @@ runs:
Auto-generated by a [dependency updater](https://github.com/getsentry/github-workflows/blob/main/updater/action.yml).
${{ env.TARGET_CHANGELOG }}
labels: dependencies

- name: Trigger PR workflows
if: ${{ ( steps.create-pr.outputs.pull-request-operation == 'created' ) && ( steps.update.outputs.pull-request-head-sha == '' || steps.update.outputs.pull-request-head-sha == steps.create-pr.outputs.pull-request-head-sha ) }}
shell: bash
working-directory: caller-repo
env:
PR_BRANCH: ${{ steps.root.outputs.prBranch }}
PR_HEAD_SHA: ${{ steps.create-pr.outputs.pull-request-head-sha }}
API_TOKEN: ${{ inputs.api-token }}
SSH_KEY: ${{ inputs.ssh-key }}
run: |
git fetch origin "$PR_BRANCH"
git checkout --force -B "$PR_BRANCH" "origin/$PR_BRANCH"

current_head=$(git rev-parse HEAD)
if [ "$current_head" != "$PR_HEAD_SHA" ]; then
echo "::notice::PR branch changed from $PR_HEAD_SHA to $current_head; skipping synthetic CI trigger."
exit 0
fi

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit --amend --no-edit

if [ -n "$API_TOKEN" ] && [ -z "$SSH_KEY" ]; then
git remote set-url origin "https://x-access-token:${API_TOKEN}@github.com/${{ github.repository }}.git"
fi

git push --force-with-lease="refs/heads/$PR_BRANCH:$PR_HEAD_SHA" origin "HEAD:refs/heads/$PR_BRANCH"
Loading