Skip to content

Commit 7693f85

Browse files
committed
CI: Skip OpenTitan workflow on forks
Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
1 parent 5d41afe commit 7693f85

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/integration-opentitan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
contents: 'read'
2222
id-token: 'write'
2323
runs-on: ubuntu-latest
24-
if: ${{ always() }} # Make this step non-cancellable to avoid orphaned instances
24+
if: ${{ github.repository_owner == 'pq-code-package' && !github.event.pull_request.head.repo.fork }}
2525
outputs:
2626
label: ${{ steps.start-ec2-runner.outputs.label }}
2727
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
@@ -98,7 +98,7 @@ jobs:
9898
- start-ec2-runner
9999
- opentitan_build # required to wait when the main job is done
100100
runs-on: ubuntu-latest
101-
if: ${{ always() }} # required to stop the runner even if errors occur
101+
if: ${{ always() && needs.start-ec2-runner.result != 'skipped' }} # required to stop the runner even if errors occur
102102
steps:
103103
- name: Configure AWS credentials
104104
uses: aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 # v6.0.0

0 commit comments

Comments
 (0)