Skip to content

Commit

Permalink
chore: fix workflow pr check error
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Nov 22, 2023
1 parent 4a0e4b4 commit ba905a2
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/doc-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ env:

jobs:
create-or-update-doc-preview:
if: github.event_name == 'pull_request' && github.event.action != 'closed'
if: github.event_name == 'pull_request_target' && github.event.action != 'closed'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
${{ steps.create-bucket-and-website.outputs.website_url_message }}
delete-doc-preview:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
if: github.event_name == 'pull_request_target' && github.event.action == 'closed'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/dockerize-runtime-exporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ jobs:
# https://github.com/docker/metadata-action#typesemver
tags: |
type=ref,event=pr
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=sha,format=short,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value={{branch}}-{{sha}},enable=${{ github.ref != format('refs/heads/{0}', 'main') && !startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') && github.event_name != 'pull_request_target' }}
type=sha,format=short,enable=${{ github.ref == format('refs/heads/{0}', 'main') && github.event_name != 'pull_request_target' }}
type=raw,value={{branch}}-{{sha}},enable=${{ github.ref != format('refs/heads/{0}', 'main') && !startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request_target' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
platforms: linux/amd64, linux/arm64

- name: Comment docker image tags to PR
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request_target'
uses: mshick/add-pr-comment@v2
with:
message-id: 'dockerize-runtime-exporter'
Expand All @@ -93,7 +93,7 @@ jobs:
trigger-workflow-build-cluster-image:
needs: [dockerize-runtime-exporter]
runs-on: ubuntu-latest
if: github.ref == format('refs/heads/{0}', 'main')
if: github.ref == format('refs/heads/{0}', 'main') && github.event_name != 'pull_request_target'
steps:
- name: trigger cluster image workflow
uses: peter-evans/repository-dispatch@v2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/dockerize-runtime-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ jobs:
tags: |
type=semver,pattern={{version}}
type=ref,event=pr
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=sha,format=short,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value={{branch}}-{{sha}},enable=${{ github.ref != format('refs/heads/{0}', 'main') && !startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') && github.event_name != 'pull_request_target' }}
type=sha,format=short,enable=${{ github.ref == format('refs/heads/{0}', 'main') && github.event_name != 'pull_request_target' }}
type=raw,value={{branch}}-{{sha}},enable=${{ github.ref != format('refs/heads/{0}', 'main') && !startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request_target' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
platforms: linux/amd64, linux/arm64

- name: Comment docker image tags to PR
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request_target'
uses: mshick/add-pr-comment@v2
with:
message-id: 'dockerize-runtime-nodejs'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/dockerize-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ jobs:
# https://github.com/docker/metadata-action#typesemver
tags: |
type=ref,event=pr
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=sha,format=short,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value={{branch}}-{{sha}},enable=${{ github.ref != format('refs/heads/{0}', 'main') && !startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') && github.event_name != 'pull_request_target' }}
type=sha,format=short,enable=${{ github.ref == format('refs/heads/{0}', 'main') && github.event_name != 'pull_request_target' }}
type=raw,value={{branch}}-{{sha}},enable=${{ github.ref != format('refs/heads/{0}', 'main') && !startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request_target' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
platforms: linux/amd64, linux/arm64

- name: Comment docker image tags to PR
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request_target'
uses: mshick/add-pr-comment@v2
with:
message-id: 'dockerize-server'
Expand All @@ -113,7 +113,7 @@ jobs:
trigger-workflow-build-cluster-image:
needs: [dockerize-server]
if: github.ref == format('refs/heads/{0}', 'main')
if: github.ref == format('refs/heads/{0}', 'main') && github.event_name != 'pull_request_target'
runs-on: ubuntu-latest
steps:
- name: trigger cluster image workflow
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/dockerize-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ jobs:
# https://github.com/docker/metadata-action#typesemver
tags: |
type=ref,event=pr
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=sha,format=short,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value={{branch}}-{{sha}},enable=${{ github.ref != format('refs/heads/{0}', 'main') && !startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') && github.event_name != 'pull_request_target' }}
type=sha,format=short,enable=${{ github.ref == format('refs/heads/{0}', 'main') && github.event_name != 'pull_request_target' }}
type=raw,value={{branch}}-{{sha}},enable=${{ github.ref != format('refs/heads/{0}', 'main') && !startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request_target' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
platforms: linux/amd64, linux/arm64

- name: Comment docker image tags to PR
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request_target'
uses: mshick/add-pr-comment@v2
with:
message-id: 'dockerize-web'
Expand All @@ -135,7 +135,7 @@ jobs:
trigger-workflow-build-cluster-image:
needs: [dockerize-web]
runs-on: ubuntu-latest
if: github.ref == format('refs/heads/{0}', 'main')
if: github.ref == format('refs/heads/{0}', 'main') && github.event_name != 'pull_request_target'
steps:
- name: trigger cluster image workflow
uses: peter-evans/repository-dispatch@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/link-pr.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: links when pr

on:
pull_request:
pull_request_target:
branches: [main]
paths:
- "**.md"
Expand Down

0 comments on commit ba905a2

Please sign in to comment.