Skip to content

Commit ef16cc9

Browse files
authored
Merge pull request #19 from ruivieira/update-gha
ci(workflow): run image build action only on upstream
2 parents 90b2d6d + cef641c commit ef16cc9

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/push-server-image.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ on:
88
paths:
99
- 'nemoguardrails/*'
1010
- '.github/workflows/*'
11-
pull_request_target:
11+
pull_request:
1212
paths:
1313
- 'nemoguardrails/*'
1414
- '.github/workflows/*'
1515
types: [labeled, opened, synchronize, reopened]
1616
workflow_dispatch:
1717
jobs:
1818
build-and-push-ci:
19+
if: github.repository == 'trustyai-explainability/NeMo-Guardrails'
1920
runs-on: ubuntu-latest
2021
permissions:
2122
contents: read
@@ -47,12 +48,15 @@ jobs:
4748
mode: minimum
4849
count: 1
4950
labels: "ok-to-test, lgtm, approved"
50-
- uses: actions/checkout@v3
51+
- uses: actions/checkout@v4
5152
if: env.BUILD_CONTEXT == 'ci'
5253
with:
5354
ref: ${{ github.event.pull_request.head.sha }}
54-
- uses: actions/checkout@v3
55+
persist-credentials: false
56+
- uses: actions/checkout@v4
5557
if: env.BUILD_CONTEXT == 'main' || env.BUILD_CONTEXT == 'tag'
58+
with:
59+
persist-credentials: false
5660
# Set environments depending on context
5761
- name: Set CI environment
5862
if: env.BUILD_CONTEXT == 'ci'

0 commit comments

Comments
 (0)