Skip to content

Commit 0ab9445

Browse files
committed
chore: Flytter ut til egen jobb for å begrense tilganger på en bedre måte.
1 parent eff47e5 commit 0ab9445

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/validatePackageChangesOnPr.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ jobs:
4040
runs-on: ubuntu-latest
4141
container: ghcr.io/flxbl-io/sfp:${{ vars.SFP_CONTAINER_VERSION }}
4242
permissions:
43-
contents: write
44-
pull-requests: write
43+
contents: read
4544
env:
4645
POOLS: ${{ vars.DEFAULT_CI_POOL }}
4746
DEVHUB_ALIAS: "devhub"
@@ -105,8 +104,16 @@ jobs:
105104
sf org delete scratch --no-prompt
106105
fi
107106
107+
setPullRequestToDraft:
108+
name: Set pull request to draft
109+
needs: validateChanges
110+
if: ${{ needs.validateChanges.result == 'failure' }}
111+
runs-on: ubuntu-latest
112+
permissions:
113+
contents: write
114+
pull-requests: write
115+
steps:
108116
- name: Set pull request to draft
109-
if: ${{ failure() && github.event_name == 'pull_request' }}
110117
uses: navikt/sf-platform/.github/actions/setPrToDraft@9beb6f0b918e4ecb8c1856d785b91749e7d48215
111118
with:
112119
pullRequestId: ${{ github.event.pull_request.node_id }}

0 commit comments

Comments
 (0)