-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
80 additions
and
12 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". | ||
|
||
name: rebuild-bot | ||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
workflow_dispatch: {} | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
CI: "true" | ||
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, | ||
'@projen rebuild') }} | ||
steps: | ||
- name: Post comment to issue | ||
uses: peter-evans/create-or-update-comment@v1 | ||
with: | ||
issue-number: ${{ github.event.issue.number }} | ||
body: "_projen_: Rebuild started" | ||
- name: Get pull request branch | ||
id: query_pull_request | ||
env: | ||
PULL_REQUEST_URL: ${{ github.event.issue.pull_request.url }} | ||
run: |- | ||
rm -f /tmp/pr.json | ||
curl --silent $PULL_REQUEST_URL > /tmp/pr.json | ||
BRANCH_STR=$(cat /tmp/pr.json | jq ".head.ref") | ||
REPO_NAME=$(cat /tmp/pr.json | jq ".head.repo.full_name") | ||
echo "::set-output name=branch::$(node -p $BRANCH_STR)" | ||
echo "::set-output name=repo::$(node -p $REPO_NAME)" | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ steps.query_pull_request.outputs.branch }} | ||
repository: ${{ steps.query_pull_request.outputs.repo }} | ||
- name: Install dependencies | ||
run: yarn install --check-files --frozen-lockfile | ||
- name: Synthesize project files | ||
run: npx projen | ||
- name: Set git identity | ||
run: |- | ||
git config user.name "Auto-bump" | ||
git config user.email "github-actions@github.com" | ||
- name: Build | ||
run: npx projen build | ||
- name: Commit changes | ||
run: 'git commit -am "chore: update generated files"' | ||
- name: Push commits | ||
run: git push origin $BRANCH | ||
env: | ||
BRANCH: ${{ steps.query_pull_request.outputs.branch }} | ||
- name: Push tags | ||
run: git push --follow-tags origin $BRANCH | ||
env: | ||
BRANCH: ${{ steps.query_pull_request.outputs.branch }} | ||
- name: Post comment to issue | ||
uses: peter-evans/create-or-update-comment@v1 | ||
with: | ||
issue-number: ${{ github.event.issue.number }} | ||
body: "_projen_: Rebuild complete. Updates pushed to pull request branch." |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,7 +118,7 @@ | |
}, | ||
{ | ||
"name": "projen", | ||
"version": "^0.17.30", | ||
"version": "^0.16.36", | ||
"type": "build" | ||
}, | ||
{ | ||
|
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