correct run

This commit is contained in:
maurizio-cacace 2023-01-13 14:53:04 +01:00
parent 55b146044e
commit 8a2f73ec2f
No known key found for this signature in database
GPG Key ID: BC860F452395F645

View File

@ -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