Skip to content

Commit

Permalink
feat: update cdk to 1.97
Browse files Browse the repository at this point in the history
  • Loading branch information
mmuller88 committed Apr 15, 2021
1 parent 7d8512f commit 88a201d
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 12 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Install dependencies
run: yarn install --check-files --frozen-lockfile
- name: Synthesize project files
run: npx projen
- name: Anti-tamper check
run: git diff --exit-code
- 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 and push changes (if any)
run: 'git diff --exit-code || (git commit -am "chore: self mutation" && git push
origin HEAD:${{ github.event.pull_request.head.ref }})'
- name: Anti-tamper check
run: git diff --exit-code
2 changes: 2 additions & 0 deletions .github/workflows/projenupgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
uses: actions/checkout@v2
- name: Install dependencies
run: yarn install --check-files --frozen-lockfile
- name: Synthesize project files
run: npx projen
- name: Upgrade projen
run: npx projen projen:upgrade
- name: Create pull request
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/rebuild-bot.yml
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."
10 changes: 8 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
fetch-depth: 0
- name: Install dependencies
run: yarn install --check-files --frozen-lockfile
- name: Synthesize project files
run: npx projen
- name: Anti-tamper check
run: git diff --exit-code
- name: Set git identity
Expand All @@ -31,9 +33,13 @@ jobs:
- name: Anti-tamper check
run: git diff --exit-code
- name: Push commits
run: git push origin HEAD:${{ github.ref }}
run: git push origin $BRANCH
env:
BRANCH: ${{ github.ref }}
- name: Push tags
run: git push --follow-tags origin ${{ github.ref }}
run: git push --follow-tags origin $BRANCH
env:
BRANCH: ${{ github.ref }}
- name: Upload artifact
uses: actions/upload-artifact@v2.1.1
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ yarn-error.log*
!/.github/pull_request_template.md
!/.github/workflows/build.yml
!/.github/workflows/projenupgrade.yml
!/.github/workflows/rebuild-bot.yml
!/.github/workflows/release.yml
!/.mergify.yml
!/.npmignore
Expand Down
2 changes: 1 addition & 1 deletion .projen/deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
},
{
"name": "projen",
"version": "^0.17.30",
"version": "^0.16.36",
"type": "build"
},
{
Expand Down
3 changes: 0 additions & 3 deletions .projen/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@
"category": "00.build",
"description": "Full release build (test+compile)",
"steps": [
{
"exec": "npx projen"
},
{
"spawn": "test"
},
Expand Down

0 comments on commit 88a201d

Please sign in to comment.