Skip to content

Commit 1eed9e3

Browse files
authored
Merge pull request #34 from sgibson91/fix-fork-warn-workflow
fix: update fork warn workflow
2 parents 5ed76e2 + 2484c1f commit 1eed9e3

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
name: Warn about PRs from forks via comment
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
branches:
66
- main
77
types:
88
- opened
9+
- reopened
910

1011
jobs:
1112
warn-forks:
1213
runs-on: ubuntu-latest
13-
if: github.repository != 'the-turing-way/teams-as-code'
14+
if: github.event.pull_request_target.head.repo.full_name != 'the-turing-way/teams-as-code'
1415
permissions:
1516
issues: write
1617
pull-requests: write

.github/workflows/plan-and-apply.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,19 @@ env:
1616

1717
concurrency:
1818
# Only run one tf job at a time to avoid conflicts and state lock
19-
group: ${{ github.workflow }}-${{ github.ref }}
19+
group: ${{ github.workflow }}
2020
cancel-in-progress: false
2121

2222
jobs:
2323
plan-apply:
24+
runs-on: ubuntu-latest
2425
# Provide GITHUB_TOKEN enough permissions to post a comment to a PR
2526
permissions:
2627
issues: write
2728
pull-requests: write
28-
runs-on: ubuntu-latest
29+
# Secrets for this workflow are in an environment with extra restrictions
30+
environment: tf-env
31+
2932
steps:
3033
- name: Checkout repo
3134
uses: actions/checkout@v6

0 commit comments

Comments
 (0)