diff --git a/.github/workflows/side-projects.yaml b/.github/workflows/side-projects.yaml index c572669d9a..e1eb6cfe18 100644 --- a/.github/workflows/side-projects.yaml +++ b/.github/workflows/side-projects.yaml @@ -17,36 +17,11 @@ env: jobs: - openscow-vagrant-check: - name: Check if the user has write permission to vagrant repo - runs-on: ubuntu-latest - permissions: read-all - outputs: - has_write_permission: ${{ steps.check-permission.outputs.result }} - steps: - - - name: Check if the user has write permission to ${{ env.VAGRANT_ORG }}/${{ env.VAGRANT_REPO }} - id: check-permission - uses: actions/github-script@v6 - with: - script: | - const { data: { permission } } = await github.rest.repos.getCollaboratorPermissionLevel({ - owner: '${{ env.VAGRANT_ORG }}', - repo: '${{ env.VAGRANT_REPO }}', - username: context.actor, - }); - - console.log(`The user has ${permission} permission to ${env.VAGRANT_ORG}/${env.VAGRANT_REPO}`); - - return permission === 'admin' || permission === 'write'; - - openscow-vagrant: - name: Update openscow-vagrant + name: Update openscow-vagrant if not from fork runs-on: ubuntu-latest - needs: openscow-vagrant-check - if: needs.openscow-vagrant-check.outputs.has_write_permission == 'true' + if: github.event.pull_request.head.repo.fork == false steps: