forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to check compatibility (opensearch-project#8486)
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com> Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
- Loading branch information
1 parent
92dd8a0
commit 5895165
Showing
2 changed files
with
46 additions
and
3 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,35 @@ | ||
--- | ||
name: Check Compatibility | ||
|
||
on: | ||
pull_request_target | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Run compatibility task | ||
run: ./gradlew checkCompatibility | tee $HOME/gradlew-check.out | ||
|
||
- name: Get results | ||
run: | | ||
echo 'Compatibility status:' > ${{ github.workspace }}/results.txt && echo '```' >> ${{ github.workspace }}/results.txt | ||
grep -e 'Compatible components' -e 'Incompatible components' -e 'Components skipped' -A 2 -B 3 $HOME/gradlew-check.out >> "${{ github.workspace }}/results.txt" | ||
echo '```' >> ${{ github.workspace }}/results.txt | ||
- name: GitHub App token | ||
id: github_app_token | ||
uses: tibdex/github-app-token@v1.6.0 | ||
with: | ||
app_id: ${{ secrets.APP_ID }} | ||
private_key: ${{ secrets.APP_PRIVATE_KEY }} | ||
installation_id: 22958780 | ||
|
||
- name: Add comment on the PR | ||
uses: peter-evans/create-or-update-comment@v3 | ||
with: | ||
token: ${{ steps.github_app_token.outputs.token }} | ||
issue-number: ${{ github.event.number }} | ||
body-path: "${{ github.workspace }}/results.txt" |
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