Procházet zdrojové kódy

fix: Improve maintainer check for Dependabot (#3525)

Signed-off-by: Aaron Dewes <aaron@nirvati.org>
Aaron Dewes před 4 měsíci
rodič
revize
39ab2fe158

+ 2 - 2
.github/workflows/build-test-image.yml

@@ -32,7 +32,7 @@ jobs:
             env:
               TEAMS: ${{ join(steps.teamAffiliation.outputs.teams, ',') }}
               ACTOR: ${{ github.actor }}
-              IS_MAINTAINER: ${{ contains(join(steps.teamAffiliation.outputs.teams, ','), 'OpenCost Maintainers') || github.actor == 'dependabot[bot]' }}
+              IS_MAINTAINER: ${{ contains(join(steps.teamAffiliation.outputs.teams, ','), 'OpenCost Maintainers') || (github.actor == 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == 'opencost/opencost') }}
             run: |
                 echo "Actor: $ACTOR"
                 echo "teams: $TEAMS"
@@ -68,4 +68,4 @@ jobs:
           actor: ${{ github.actor }}
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           image_tag: ${{ steps.tags.outputs.IMAGE_TAG }}
-          release_version: test-${{ steps.sha.outputs.OC_SHORTHASH }}
+          release_version: test-${{ steps.sha.outputs.OC_SHORTHASH }}

+ 2 - 2
.github/workflows/integration-testing.yaml

@@ -37,7 +37,7 @@ jobs:
           env:
             TEAMS: ${{ join(steps.teamAffiliation.outputs.teams, ',') }}
             ACTOR: ${{ github.actor }}
-            IS_MAINTAINER: ${{ contains(join(steps.teamAffiliation.outputs.teams, ','), 'OpenCost Maintainers') || github.actor == 'dependabot[bot]' }}
+            IS_MAINTAINER: ${{ contains(join(steps.teamAffiliation.outputs.teams, ','), 'OpenCost Maintainers') || (github.actor == 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == 'opencost/opencost') }}
           run: |
               echo "Actor: $ACTOR"
               echo "Is maintainer: $IS_MAINTAINER"
@@ -306,4 +306,4 @@ jobs:
           with:
               token: ${{ secrets.GITHUB_TOKEN }}
               labels: |
-                integration tests failed
+                integration tests failed