mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
correct run
This commit is contained in:
parent
55b146044e
commit
8a2f73ec2f
31
.github/workflows/pull-request.yml
vendored
31
.github/workflows/pull-request.yml
vendored
@ -64,36 +64,7 @@ env:
|
|||||||
DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
|
DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
|
||||||
DOCKER_REPOSITORY: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/demo-shell"
|
DOCKER_REPOSITORY: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/demo-shell"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-if-pr-is-approved:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Check if PR is approved
|
|
||||||
id: action
|
|
||||||
uses: kamatama41/get-pr-number-action@v0
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Show the number
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ github.token }}
|
|
||||||
shell: bash
|
|
||||||
if: ${{ github.event_name != 'schedule' }}
|
|
||||||
run: |
|
|
||||||
echo "PR number is: ${{ steps.action.outputs.number }}"
|
|
||||||
prNumber=${{ steps.action.outputs.number }}
|
|
||||||
checkApproval=$(gh api /repos/Alfresco/alfresco-ng2-components/pulls/$prNumber/reviews | jq '.[] | select(.state == "APPROVED") | .user.login')
|
|
||||||
if [[ $checkApproval ]]; then
|
|
||||||
echo "PR approved"
|
|
||||||
else
|
|
||||||
echo "PR not approved yet"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
# long timeout required when cache has to be recreated
|
# long timeout required when cache has to be recreated
|
||||||
|
Loading…
x
Reference in New Issue
Block a user