chore: updated workflow permissions and run conditions

Signed-off-by: Adithya Krishna <adi@documenso.com>
This commit is contained in:
Adithya Krishna
2023-12-04 16:20:02 +05:30
parent 02e96bbd0a
commit f181099e74
8 changed files with 9 additions and 5 deletions

View File

@ -16,6 +16,7 @@ env:
jobs:
build_app:
name: Build App
if: github.repository == 'documenso/documenso'
runs-on: ubuntu-latest
steps:
- name: Checkout

View File

@ -9,6 +9,7 @@ on:
jobs:
analyze:
if: github.repository == 'documenso/documenso'
name: Analyze
runs-on: ubuntu-latest
permissions:

View File

@ -13,9 +13,9 @@ permissions:
jobs:
welcome-message:
name: Welcome Contributors
if: github.repository == 'documenso/documenso' && github.event.action == 'opened'
runs-on: ubuntu-latest
timeout-minutes: 10
if: github.event.action == 'opened'
steps:
- uses: actions/first-interaction@v1
with:

View File

@ -10,7 +10,7 @@ permissions:
jobs:
countIssues:
if: ${{ !github.event.issue.pull_request }}
if: ${{ !github.event.issue.pull_request }} && github.repository == 'documenso/documenso' && github.event.comment.author_association == 'MEMBER' || 'COLLABORATOR' || 'OWNER'
runs-on: ubuntu-latest
env:
MY_ENV_VARIABLE: ${{ secrets.GITHUB_TOKEN }}

View File

@ -6,11 +6,11 @@ on:
types: [created]
permissions:
pull-requests: write
pull-requests: write
jobs:
countPRs:
if: ${{ github.event.issue.pull_request }}
if: ${{ github.event.issue.pull_request }} && github.repository == 'documenso/documenso' && github.event.comment.author_association == 'MEMBER' || 'COLLABORATOR' || 'OWNER'
runs-on: ubuntu-latest
env:
MY_ENV_VARIABLE: ${{ secrets.GITHUB_TOKEN }}

View File

@ -9,6 +9,7 @@ concurrency:
jobs:
labeler:
if: github.repository == 'documenso/documenso'
permissions:
contents: read
pull-requests: write

View File

@ -13,6 +13,7 @@ permissions:
jobs:
validate-pr:
if: github.repository == 'documenso/documenso'
name: Validate PR title
runs-on: ubuntu-latest
steps:

View File

@ -6,7 +6,7 @@ on:
jobs:
stale:
if: github.repository == 'documenso/documenso'
runs-on: ubuntu-latest
permissions:
issues: write