File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -192,7 +192,11 @@ jobs:
192192 run-lrc : true
193193
194194 - name : Prepare deb and sources for upload
195- if : steps.restore-cache.outputs.cache-hit != 'true'
195+ if : >
196+ steps.restore-cache.outputs.cache-hit != 'true' &&
197+ # Skip if the PR is from a fork, as we don't have the permission to
198+ # upload to the OCI registry.
199+ github.event.pull_request.head.repo.full_name == github.repository
196200 run : |
197201 set -euo pipefail
198202 set -x
@@ -220,6 +224,9 @@ jobs:
220224 echo "PKG_TARBALL=${PKG_TARBALL}" >> ${GITHUB_ENV}
221225
222226 - name : Upload deb and sources as OCI artifacts
227+ # Skip if the PR is from a fork, as we don't have the permission to
228+ # upload to the OCI registry.
229+ if : github.event.pull_request.head.repo.full_name == github.repository
223230 run : |
224231 set -euo pipefail
225232 set -x
Original file line number Diff line number Diff line change @@ -59,6 +59,10 @@ concurrency:
5959jobs :
6060 compute-hash :
6161 name : Compute hash of build-relevant files
62+ # Skip this job (and the provision-and-run job which depends on it) if the
63+ # PR is from a fork, as we won't be able to pass the Debian package via OCI
64+ # artifacts in the provision-and-run workflow.
65+ if : github.event.pull_request.head.repo.full_name == github.repository
6266 runs-on : ubuntu-latest
6367 outputs :
6468 files-hash : ${{ steps.hash.outputs.hash }}
You can’t perform that action at this time.
0 commit comments