Skip to content

Commit

Permalink
WIP fix workflow with pull_request_target event
Browse files Browse the repository at this point in the history
  • Loading branch information
neoformit committed Nov 20, 2024
1 parent ceffa0e commit 652fd0c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/gitpod-pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
name: Preview on Gitpod

on:
pull_request:
pull_request_target:
types: [opened]

jobs:
gitpod-preview:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
- name: Check out base branch
uses: actions/checkout@v3
with:
repository: ${{ github.repository }}
ref: ${{ github.event.pull_request.base.ref }}

- name: Comment with Gitpod link
env:
GH_TOKEN: ${{ secrets.PR_ACCESS_TOKEN }}
GH_TOKEN: ${{ github.token }}
REPO_URL: "https://github.com/${{ github.event.pull_request.head.repo.full_name }}/tree/${{ github.event.pull_request.head.ref }}"
run: |
GITPOD_URL="https://gitpod.io/#${REPO_URL}"
Expand Down

0 comments on commit 652fd0c

Please sign in to comment.