Skip to content

Commit

Permalink
Update github-config to ff2962f
Browse files Browse the repository at this point in the history
  • Loading branch information
paketo-bot authored and ForestEckhardt committed Feb 22, 2021
1 parent 68d98fd commit f738c88
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 16 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/test-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,33 @@ jobs:
GIT_TOKEN: ${{ github.token }}

approve:
name: Auto 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: Approve
- 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
Expand Down
49 changes: 35 additions & 14 deletions .github/workflows/update-github-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,46 @@ jobs:
runs-on: ubuntu-latest
steps:

# checkout paketo github-config as src-repo
- name: Checkout paketo github-config repo
- name: Checkout
uses: actions/checkout@v2

- name: Checkout github-config
uses: actions/checkout@v2
with:
repository: paketo-buildpacks/github-config
path: config-repo
path: github-config

# checkout this repo
- name: Checkout
uses: actions/checkout@v2
- name: Checkout Branch
uses: paketo-buildpacks/github-config/actions/pull-request/checkout-branch@main
with:
path: current-repo
branch: automation/github-config/update

- name: Run the sync action
uses: paketo-buildpacks/github-config/actions/sync@main
env:
GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
uses: paketo-buildpacks/github-config/actions/sync@sync-action
with:
workspace: /github/workspace
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: "."

- 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:
config-repo: config-repo
current-repo: current-repo
config-path: "/implementation"
ssh-private-key: ${{ secrets.PAKETO_BOT_SSH_KEY }}
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
title: "Updates github-config"
branch: automation/github-config/update

0 comments on commit f738c88

Please sign in to comment.