import upstream #173
This file contains hidden or 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: import upstream | |
| on: | |
| schedule: | |
| - cron: "0 0 * * 0" | |
| workflow_dispatch: | |
| permissions: write-all | |
| jobs: | |
| import: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| - id: import | |
| run: | | |
| make import | |
| echo "commit=$(cat .github/UPSTREAM | head -n1)" >> $GITHUB_OUTPUT | |
| - name: Create Pull Request | |
| id: cpr | |
| uses: peter-evans/create-pull-request@v8 | |
| with: | |
| commit-message: "feat: import upstream package" | |
| title: "Import upstream package [create-pull-request]" | |
| body: | | |
| Import upstream changes from [tree](https://github.com/golang/tools/tree/${{ steps.import.outputs.commit }}/internal/diff). | |
| Take a look at the [diff](https://github.com/golang/tools/commits/master/internal/diff) to see what changed. | |
| branch: "import-upstream" | |
| delete-branch: true | |
| - name: Check outputs | |
| if: ${{ steps.cpr.outputs.pull-request-number }} | |
| run: | | |
| echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
| echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" | |
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json |