-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into henrymercer/enable-features-on-ghes
- Loading branch information
Showing
8 changed files
with
107 additions
and
25 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Rebuild Action | ||
|
||
on: | ||
pull_request: | ||
types: [labeled] | ||
|
||
jobs: | ||
rebuild: | ||
name: Rebuild Action | ||
runs-on: ubuntu-latest | ||
if: github.event.label.name == 'Rebuild' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Remove label | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PR_NUMBER: ${{ github.event.pull_request.number }} | ||
run: | | ||
gh pr edit --repo github/codeql-action "$PR_NUMBER" \ | ||
--remove-label "Rebuild" | ||
- name: Compile TypeScript | ||
run: | | ||
npm install | ||
npm run lint -- --fix | ||
npm run build | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Generate workflows | ||
run: | | ||
cd pr-checks | ||
python -m pip install --upgrade pip | ||
pip install ruamel.yaml==0.17.31 | ||
python3 sync.py | ||
- name: Check for changes and push | ||
env: | ||
BRANCH: ${{ github.event.pull_request.head.ref }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PR_NUMBER: ${{ github.event.pull_request.number }} | ||
run: | | ||
if [ ! -z "$(git status --porcelain)" ]; then | ||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --global user.name "github-actions[bot]" | ||
git commit -am "Rebuild" | ||
git push origin "HEAD:$BRANCH" | ||
echo "Pushed a commit to rebuild the Action." \ | ||
"Please mark the PR as ready for review to trigger PR checks." | | ||
gh pr comment --body-file - --repo github/codeql-action "$PR_NUMBER" | ||
gh pr ready --undo --repo github/codeql-action "$PR_NUMBER" | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: compile-ts | ||
name: Compile typescript | ||
files: \.[tj]s$ | ||
language: system | ||
entry: npm run build | ||
pass_filenames: false | ||
- id: lint-ts | ||
name: Lint typescript code | ||
files: \.ts$ | ||
language: system | ||
entry: npm run lint -- --fix | ||
- id: pr-checks-sync | ||
name: Synchronize PR check workflows | ||
files: ^.github/workflows/__.*\.yml$|^pr-checks | ||
language: system | ||
entry: python3 pr-checks/sync.py | ||
pass_filenames: false |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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