-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update bootstrapper workflows and dependabot config (#53)
* update bootstrapper workflows and dependabot * update template cnb go.mod with dependabot * Update template cnb scripts * update top level workflows
- Loading branch information
1 parent
adaa184
commit e0c9356
Showing
24 changed files
with
657 additions
and
323 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,12 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: gomod | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
- package-ecosystem: gomod | ||
directory: "/template-cnb" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 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,46 @@ | ||
name: Auto-Merge | ||
|
||
on: | ||
pull_request_review: | ||
types: | ||
- submitted | ||
|
||
jobs: | ||
automerge: | ||
name: Merge or Rebase | ||
if: ${{ github.event.review.user.login == 'paketo-bot-reviewer' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Fetch Pull Request Details | ||
id: pull_request | ||
env: | ||
NUMBER: ${{ github.event.pull_request.number }} | ||
GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} | ||
run: | | ||
payload="$( | ||
curl "https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls/${NUMBER}" \ | ||
--silent \ | ||
--location \ | ||
--header "Authorization: token ${GITHUB_TOKEN}" | ||
)" | ||
echo "::set-output name=mergeable_state::$(echo "${payload}" | jq -r -c .mergeable_state)" | ||
- name: Merge | ||
if: ${{ steps.pull_request.outputs.mergeable_state == 'clean' }} | ||
uses: paketo-buildpacks/github-config/actions/pull-request/merge@main | ||
with: | ||
user: paketo-bot | ||
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} | ||
number: ${{ github.event.pull_request.number }} | ||
|
||
- name: Rebase | ||
if: ${{ steps.pull_request.outputs.mergeable_state == 'behind' }} | ||
uses: paketo-buildpacks/github-config/actions/pull-request/rebase@main | ||
with: | ||
user: paketo-bot | ||
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} | ||
number: ${{ github.event.pull_request.number }} |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Test Pull Request | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
unit: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.14 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run Unit Tests | ||
run: ./scripts/unit.sh | ||
|
||
integration: | ||
name: Integration Tests | ||
runs-on: ubuntu-latest | ||
needs: unit | ||
steps: | ||
- name: Setup Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.14 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true | ||
|
||
- name: Run Integration Tests | ||
run: ./scripts/integration.sh | ||
env: | ||
GIT_TOKEN: ${{ github.token }} | ||
|
||
approve: | ||
name: Approve Bot PRs | ||
if: ${{ github.event.pull_request.user.login == 'paketo-bot' || github.event.pull_request.user.login == 'dependabot[bot]' }} | ||
runs-on: ubuntu-latest | ||
needs: integration | ||
steps: | ||
- name: Check Commit Verification | ||
id: unverified-commits | ||
uses: paketo-buildpacks/github-config/actions/pull-request/check-unverified-commits@main | ||
with: | ||
token: ${{ secrets.PAKETO_BOT_REVIEWER_GITHUB_TOKEN }} | ||
repo: ${{ github.repository }} | ||
number: ${{ github.event.number }} | ||
|
||
- name: Check for Human Commits | ||
id: human-commits | ||
uses: paketo-buildpacks/github-config/actions/pull-request/check-human-commits@main | ||
with: | ||
token: ${{ secrets.PAKETO_BOT_REVIEWER_GITHUB_TOKEN }} | ||
repo: ${{ github.repository }} | ||
number: ${{ github.event.number }} | ||
|
||
- name: Checkout | ||
if: steps.human-commits.outputs.human_commits == 'false' && steps.unverified-commits.outputs.unverified_commits == 'false' | ||
uses: actions/checkout@v2 | ||
|
||
- name: Auto Approve | ||
if: steps.human-commits.outputs.human_commits == 'false' && steps.unverified-commits.outputs.unverified_commits == 'false' | ||
uses: paketo-buildpacks/github-config/actions/pull-request/approve@main | ||
with: | ||
user: paketo-bot-reviewer | ||
token: ${{ secrets.PAKETO_BOT_REVIEWER_GITHUB_TOKEN }} | ||
author: ${{ github.event.pull_request.user.login }} | ||
number: ${{ github.event.number }} |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Update shared github-config | ||
|
||
on: | ||
schedule: | ||
- cron: '*/15 * * * *' | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
build: | ||
name: Create PR to update shared files | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} | ||
|
||
- name: Checkout github-config | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: paketo-buildpacks/github-config | ||
path: github-config | ||
|
||
- name: Checkout Branch | ||
uses: paketo-buildpacks/github-config/actions/pull-request/checkout-branch@main | ||
with: | ||
branch: automation/github-config/update | ||
|
||
- name: Run the sync action for template CNB | ||
uses: paketo-buildpacks/github-config/actions/sync@main | ||
with: | ||
workspace: /github/workspace/template-cnb | ||
config: /github/workspace/github-config/implementation | ||
|
||
- name: Cleanup | ||
run: rm -rf github-config | ||
|
||
- name: Commit | ||
id: commit | ||
uses: paketo-buildpacks/github-config/actions/pull-request/create-commit@main | ||
with: | ||
message: "Updating github-config" | ||
pathspec: "." | ||
keyid: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY_ID }} | ||
key: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY }} | ||
|
||
- name: Push Branch | ||
if: ${{ steps.commit.outputs.commit_sha != '' }} | ||
uses: paketo-buildpacks/github-config/actions/pull-request/push-branch@main | ||
with: | ||
branch: automation/github-config/update | ||
|
||
- name: Open Pull Request | ||
if: ${{ steps.commit.outputs.commit_sha != '' }} | ||
uses: paketo-buildpacks/github-config/actions/pull-request/open@main | ||
with: | ||
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} | ||
title: "Updates github-config" | ||
branch: automation/github-config/update |
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,46 @@ | ||
name: Auto-Merge | ||
|
||
on: | ||
pull_request_review: | ||
types: | ||
- submitted | ||
|
||
jobs: | ||
automerge: | ||
name: Merge or Rebase | ||
if: ${{ github.event.review.user.login == 'paketo-bot-reviewer' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Fetch Pull Request Details | ||
id: pull_request | ||
env: | ||
NUMBER: ${{ github.event.pull_request.number }} | ||
GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} | ||
run: | | ||
payload="$( | ||
curl "https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls/${NUMBER}" \ | ||
--silent \ | ||
--location \ | ||
--header "Authorization: token ${GITHUB_TOKEN}" | ||
)" | ||
echo "::set-output name=mergeable_state::$(echo "${payload}" | jq -r -c .mergeable_state)" | ||
- name: Merge | ||
if: ${{ steps.pull_request.outputs.mergeable_state == 'clean' || steps.pull_request.outputs.mergeable_state == 'unstable' }} | ||
uses: paketo-buildpacks/github-config/actions/pull-request/merge@main | ||
with: | ||
user: paketo-bot | ||
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} | ||
number: ${{ github.event.pull_request.number }} | ||
|
||
- name: Rebase | ||
if: ${{ steps.pull_request.outputs.mergeable_state == 'behind' }} | ||
uses: paketo-buildpacks/github-config/actions/pull-request/rebase@main | ||
with: | ||
user: paketo-bot | ||
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} | ||
number: ${{ github.event.pull_request.number }} |
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.