-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created a GitHub Action to generate the Third Party report. (#2033)
Signed-off-by: David Venable <dlv@amazon.com>
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 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,54 @@ | ||
# This workflow generates the THIRD-PARTY file and creates a PR from the changes. | ||
# For more information see: https://github.com/marketplace/actions/create-pull-request | ||
|
||
name: Third Party Generate | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
generate: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Checkout Data-Prepper | ||
uses: actions/checkout@v2 | ||
|
||
- name: Generate Third Party Report | ||
run: ./gradlew --no-daemon generateThirdPartyReport | ||
|
||
- name: Get Git metadata | ||
run: | | ||
echo GIT_SHORT_HASH=`git rev-parse --short "$GITHUB_SHA"` >> $GITHUB_ENV | ||
echo GITHUB_REF_NAME=${GITHUB_REF#refs/heads/} >> $GITHUB_ENV | ||
- 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 }} | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
token: ${{ steps.github_app_token.outputs.token }} | ||
add-paths: THIRD-PARTY | ||
commit-message: 'Generated THIRD-PARTY file for ${{ env.GIT_SHORT_HASH }}' | ||
signoff: true | ||
branch: third-party/third-party-${{ env.GIT_SHORT_HASH }}-to-${{ env.GITHUB_REF_NAME }} | ||
delete-branch: true | ||
title: 'Generated THIRD-PARTY file for ${{ env.GIT_SHORT_HASH }}' | ||
body: | | ||
Generated `THIRD-PARTY` file with: | ||
``` | ||
./gradlew --no-daemon generateThirdPartyReport | ||
``` | ||
Branch: ${{ env.GITHUB_REF_NAME }} | ||
Commit: ${{ env.GIT_SHORT_HASH }} |