Skip to content

Commit

Permalink
Changing Pull Request Target.
Browse files Browse the repository at this point in the history
Allowing changes in the GitHub Actions in the PRs.
  • Loading branch information
otaviof committed Feb 25, 2022
1 parent a0efb02 commit 910c014
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/pullrequest.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
# for pull request the actions context is a little bit different. we always use the workflow as
# defined in the main branch, therefore any change in .github/workflow directory introduced by
# the PR is ignored. this happens because if leverage the "on: pull_request_target" instead of
# "on: pull_request". the only practical difference here is that when we checkout the source
# code we use the source repository (the repo used to open the pr), see "check out code" steps.
---
name: pullrequest

on:
pull_request_target:
pull_request:
branches:
- main

Expand Down Expand Up @@ -94,7 +89,7 @@ jobs:
uses: docker/login-action@v1
with:
registry: ghcr.io
username: shipwright-io
username: ${{ github.event.issue.user.login }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: build image
Expand All @@ -104,7 +99,7 @@ jobs:
push: true
context: ./
file: ./Containerfile
tags: ghcr.io/shipwright-io/imgctrl:pr-${{ github.event.number }}
tags: ghcr.io/${{ github.event.issue.user.login }}/imgctrl:pr-${{ github.event.number }}

release:
name: release
Expand Down

0 comments on commit 910c014

Please sign in to comment.