Skip to content

Commit

Permalink
Using Github App for check-repos workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Vacha Shah <vachshah@amazon.com>
  • Loading branch information
VachaShah committed Mar 10, 2022
1 parent 0cfea65 commit 8a0fffc
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/check-repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,34 @@ jobs:
check-project-repos:
runs-on: ubuntu-latest
steps:
- name: GitHub App token
id: github_app_token
uses: tibdex/github-app-token@v1.5.0
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
installation_id: 22958780

- uses: actions/checkout@v2
- name: Update project repositories
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.github_app_token.outputs.token }}
run: |
npm install -g meta
./scripts/update.sh
echo REPOS_ADDED=$(git diff --unified=0 .gitignore | grep '+/' | cut -f2 -d'/' | paste -sd ',' - | sed "s/,/, /g" | sed 's/\(.*\),/\1 and/') >> $GITHUB_ENV
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ steps.github_app_token.outputs.token }}
commit-message: Added ${{ env.REPOS_ADDED }}.
signoff: true
delete-branch: true
title: 'Added ${{ env.REPOS_ADDED }}.'
body: |
Added ${{ env.REPOS_ADDED }}.
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
Expand Down

0 comments on commit 8a0fffc

Please sign in to comment.