Sync from upstream #38
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: Sync from upstream | |
| on: | |
| schedule: | |
| - cron: '0 6 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Sync default branch | |
| run: gh repo sync ${{ github.repository }} --force | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Forward upstream tags | |
| run: | | |
| git remote add upstream https://github.com/openresty/stream-lua-nginx-module.git | |
| git fetch upstream --tags | |
| # Push any new tags from upstream (won't overwrite existing tags) | |
| git push origin --tags 2>/dev/null || true |