fix checkout action in pull_request_target #1794
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull Request Update | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
pull_request_target: | |
branches: [ 'main' ] | |
types: [opened, synchronize, reopened, unlabeled] | |
jobs: | |
test: | |
name: Test For Lint and Breaking Changes | |
if: contains(github.event.pull_request.labels.*.name, 'safe to test') | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: bufbuild/buf-setup-action@v1 | |
# Run all Lint runs | |
- uses: bufbuild/buf-lint-action@v1 | |
# Run breaking change detection against the `main` branch | |
- uses: bufbuild/buf-breaking-action@v1 | |
with: | |
against: 'https://github.com/viamrobotics/api.git#branch=main' |