[FLINK-34953][ci] Add github ci for flink-web to auto commit build files - #732
[FLINK-34953][ci] Add github ci for flink-web to auto commit build files#732GOODBOY008 wants to merge 1 commit into
Conversation
|
The Action result: https://github.com/GOODBOY008/flink-web/commits/asf-site/ |
| pull_request: | ||
| branches: | ||
| - asf-site |
There was a problem hiding this comment.
I don't think this should work on PRs, but only on pushes? Else you would commit code during a PR creation?
There was a problem hiding this comment.
I want to enable website build check for pr to avoid doc error without auto commit.
There was a problem hiding this comment.
But in this setup, you will always build and commit the docs as well.
|
|
||
| - name: Commit and push website build | ||
| if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | ||
| uses: stefanzweifel/git-auto-commit-action@v5 |
There was a problem hiding this comment.
Per https://infra.apache.org/github-actions-policy.html we must review and pin this
| echo "author=$(git log -1 --pretty=\"%an <%ae>\")" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Commit and push website build | ||
| if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} |
There was a problem hiding this comment.
@MartijnVisser With push event for pr merge into branch and workflow_dispatch for manual trigger to rebuild website.
|
@MartijnVisser @XComp PTAL |
|
@MartijnVisser Can you give me some suggestions? |
184430d to
e030400
Compare
|
@MartijnVisser @XComp The PR Funtion review: |
e030400 to
3af48b8
Compare
| # Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository. | ||
| contents: write | ||
| steps: | ||
| - name: Checkout repository |
There was a problem hiding this comment.
I like this idea. I wonder about.
- we should not rebuild the website if the change to the website is not a source file
- so we are clean - maybe we should also reject PR changes that contain any changes to the generated part of the repo.
|
I'm not personally convinced this is worth the effort, but I don't want that to be the only thing holding it up. If there's broader appetite for it, the thing to solve first is that our source and our generated output live on the same branch. That's what makes this workflow commit to the branch that triggered it, and it's why generated HTML can end up in PR diffs. NiFi and DataFusion keep those separate; we'd want to do the same before auto-committing is safe. That's a dev@ discussion rather than something to solve in this PR. Separately: |


Changes: