chore(ci): add create release workflow #5
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: sync zoekt | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
branches: | |
- master | |
jobs: | |
sync-zoekt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
repository: 'sourcegraph/sourcegraph' | |
ref: 'main' | |
- uses: actions/setup-go@v2 | |
with: { go-version: '1.17' } | |
- run: go mod download | |
- run: ./dev/zoekt/update | |
- uses: peter-evans/create-pull-request@v3 | |
if: github.event_name == 'push' | |
name: 'Create PR' | |
id: pr | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
title: 'zoekt: update to sourcegraph/zoekt@${{ github.sha }}' | |
commit-message: 'zoekt: update to sourcegraph/zoekt@${{ github.sha }}' | |
body: | | |
This PR is autogenerated to update to sourcegraph/zoekt@${{ github.sha }} | |
## Test Plan | |
Testing is done on the zoekt repo. All checks on this PR are sufficient. | |
branch: 'zoekt/update' | |
delete-branch: 'true' | |
team-reviewers: 'search-core' | |
base: 'main' | |
- name: 'Check PR outputs' | |
run: | | |
echo "Pull Request Number - ${{ steps.pr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.pr.outputs.pull-request-url }}" | |
- uses: peter-evans/enable-pull-request-automerge@v1 | |
name: Enable Pull Request Automerge | |
if: steps.pr.outputs.pull-request-operation == 'created' | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
pull-request-number: ${{ steps.pr.outputs.pull-request-number }} | |
merge-method: squash | |
repository: 'sourcegraph/sourcegraph' |