forked from heroku/heroku-buildpack-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from mentimeter/focus-workspace-production
Focus workspace production
- Loading branch information
Showing
50 changed files
with
1,723 additions
and
1,144 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Hatchet app cleaner | ||
|
||
on: | ||
schedule: | ||
# Daily at 6am UTC. | ||
- cron: "0 6 * * *" | ||
# Allow the workflow to be manually triggered too. | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
hatchet-app-cleaner: | ||
runs-on: ubuntu-latest | ||
env: | ||
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | ||
HEROKU_API_USER: ${{ secrets.HEROKU_API_USER }} | ||
HEROKU_DISABLE_AUTOUPDATE: 1 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install Ruby and dependencies | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
ruby-version: "2.7" | ||
- name: Run Hatchet destroy | ||
# Only apps older than 10 minutes are destroyed, to ensure that any | ||
# in progress CI runs are not interrupted. | ||
run: bundle exec hatchet destroy --older-than 10 |
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,87 @@ | ||
name: Update Inventory | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '00 4 * * 1-5' | ||
|
||
jobs: | ||
update-nodejs-inventory: | ||
name: Update Node.js Engine Inventory | ||
runs-on: pub-hk-ubuntu-22.04-small | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Install Rust Toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- name: Install Rust Inventory Binaries | ||
run: cargo install heroku-nodejs-utils --bin diff_versions --bin generate_inventory --git https://github.com/heroku/buildpacks-nodejs | ||
- id: set-diff-msg | ||
name: Set Diff Message | ||
run: echo "::set-output name=msg::$(diff_versions node inventory/node.toml)" | ||
- name: Rebuild Inventory | ||
run: "generate_inventory node > inventory/node.toml" | ||
- name: Update Changelog | ||
run: echo "${{ steps.set-diff-msg.outputs.msg }}" | xargs -r -I '{}' perl -i -p -e 's/## main\s+/## main\n\n{}/' CHANGELOG.md | ||
- uses: heroku/use-app-token-action@main | ||
id: generate-token | ||
with: | ||
app_id: ${{ vars.LINGUIST_GH_APP_ID }} | ||
private_key: ${{ secrets.LINGUIST_GH_PRIVATE_KEY }} | ||
- name: Create Pull Request | ||
id: pr | ||
uses: peter-evans/[email protected] | ||
with: | ||
token: ${{ steps.generate-token.outputs.app_token }} | ||
title: "Update Node.js Engine Inventory" | ||
commit-message: "Update Inventory for heroku/nodejs engine\n\n${{ steps.set-diff-msg.outputs.msg }}" | ||
branch: update-nodejs-inventory | ||
labels: "automation" | ||
body: "Automated pull-request to update heroku/nodejs engine inventory:\n\n${{ steps.set-diff-msg.outputs.msg }}" | ||
- name: Configure PR | ||
if: steps.pr.outputs.pull-request-operation == 'created' | ||
run: gh pr merge --squash --auto "${{ steps.pr.outputs.pull-request-number }}" | ||
env: | ||
GH_TOKEN: ${{ steps.generate-token.outputs.app_token }} | ||
|
||
update-yarn-inventory: | ||
name: Update Node.js Yarn Inventory | ||
runs-on: pub-hk-ubuntu-22.04-small | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- id: install-rust-toolchain | ||
name: Install Rust Toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- name: Install Rust Inventory Binaries | ||
run: cargo install heroku-nodejs-utils --bin diff_versions --bin generate_inventory --git https://github.com/heroku/buildpacks-nodejs | ||
- id: set-diff-msg | ||
name: Set Diff Message | ||
run: echo "::set-output name=msg::$(diff_versions yarn inventory/yarn.toml)" | ||
- name: Rebuild Inventory | ||
run: "generate_inventory yarn > inventory/yarn.toml" | ||
- name: Update Changelog | ||
run: echo "${{ steps.set-diff-msg.outputs.msg }}" | xargs -r -I '{}' perl -i -p -e 's/## main\s+/## main\n\n{}/' CHANGELOG.md | ||
- uses: heroku/use-app-token-action@main | ||
id: generate-token | ||
with: | ||
app_id: ${{ vars.LINGUIST_GH_APP_ID }} | ||
private_key: ${{ secrets.LINGUIST_GH_PRIVATE_KEY }} | ||
- name: Create Pull Request | ||
id: pr | ||
uses: peter-evans/[email protected] | ||
with: | ||
token: ${{ steps.generate-token.outputs.app_token }} | ||
title: "Update Node.js Yarn Inventory" | ||
commit-message: "Update Inventory for heroku/nodejs yarn\n\n${{ steps.set-diff-msg.outputs.msg }}" | ||
branch: update-yarn-inventory | ||
labels: "automation" | ||
body: "Automated pull-request to update heroku/nodejs yarn inventory:\n\n${{ steps.set-diff-msg.outputs.msg }}" | ||
- name: Configure PR | ||
if: steps.pr.outputs.pull-request-operation == 'created' | ||
run: gh pr merge --squash --auto "${{ steps.pr.outputs.pull-request-number }}" | ||
env: | ||
GH_TOKEN: ${{ steps.generate-token.outputs.app_token }} |
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
.DS_Store | ||
repos/* | ||
.idea | ||
.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
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
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
Oops, something went wrong.