@@ -522,9 +522,10 @@ jobs:
522522 run : |
523523 nix develop --impure .#ci -c make lint-helm
524524
525- artifacts :
525+ trusted- artifacts :
526526 name : Artifacts
527527 uses : ./.github/workflows/artifacts.yaml
528+ if : ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
528529 with :
529530 publish : ${{ github.event_name == 'push' }}
530531 permissions :
@@ -533,6 +534,23 @@ jobs:
533534 id-token : write
534535 security-events : write
535536
537+ untrusted-artifacts :
538+ name : Untrusted Artifacts
539+ if : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
540+ uses : ./.github/workflows/untrusted-artifacts.yaml
541+ permissions :
542+ contents : read
543+
544+ artifacts-pass :
545+ name : Artifacts
546+ needs :
547+ - trusted-artifacts
548+ - untrusted-artifacts
549+ if : ${{ always() }}
550+ uses : ./.github/workflows/workflow-result.yaml
551+ with :
552+ result : ${{ contains(needs.*.result, 'failure') && 'fail' || 'pass' }}
553+
536554 dependency-review :
537555 name : Dependency review
538556 runs-on : ubuntu-latest
@@ -568,7 +586,9 @@ jobs:
568586 name : Quickstart
569587 runs-on : depot-ubuntu-latest-8
570588 needs :
571- - artifacts
589+ - trusted-artifacts
590+ - untrusted-artifacts
591+ if : ${{ !cancelled() && !contains(needs.*.result, 'failure') && contains(needs.*.result, 'success') }}
572592
573593 steps :
574594 - name : Checkout repository
@@ -577,8 +597,9 @@ jobs:
577597 persist-credentials : false
578598
579599 - name : Create override files for quickstart
600+ if : ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
580601 env :
581- DEPOT_IMAGE_URL : ${{ needs.artifacts.outputs.container-image-url-depot }}
602+ DEPOT_IMAGE_URL : ${{ needs.trusted- artifacts.outputs.container-image-url-depot }}
582603 run : |
583604 cat > quickstart/docker-compose.override.yaml <<EOF
584605 services:
@@ -605,7 +626,36 @@ jobs:
605626 docker ps -a
606627 docker network ls
607628 echo "### DEBUG"
608-
629+ - name : Build as part of quickstart
630+ if : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
631+ run : |
632+ cat > quickstart/docker-compose.override.yaml <<EOF
633+ services:
634+ openmeter:
635+ image: openmeter-quickstart-openmeter:ci
636+ pull_policy: build
637+ build: ..
638+ sink-worker:
639+ image: openmeter-quickstart-sink-worker:ci
640+ pull_policy: build
641+ build: ..
642+ balance-worker:
643+ image: openmeter-quickstart-balance-worker:ci
644+ pull_policy: build
645+ build: ..
646+ notification-service:
647+ image: openmeter-quickstart-notification-service:ci
648+ pull_policy: build
649+ build: ..
650+ billing-worker:
651+ image: openmeter-quickstart-billing-worker:ci
652+ pull_policy: build
653+ build: ..
654+ openmeter-jobs:
655+ image: openmeter-quickstart-openmeter-jobs:ci
656+ pull_policy: build
657+ build: ..
658+ EOF
609659 - name : Launch Docker Compose
610660 run : docker compose -f docker-compose.yaml -f docker-compose.override.yaml up -d
611661 working-directory : quickstart
@@ -666,7 +716,9 @@ jobs:
666716 runs-on : depot-ubuntu-latest-8
667717 # Note: This check is running against the image that is going to be pushed.
668718 needs :
669- - artifacts
719+ - trusted-artifacts
720+ - untrusted-artifacts
721+ if : ${{ !cancelled() && !contains(needs.*.result, 'failure') && contains(needs.*.result, 'success') }}
670722
671723 steps :
672724 - name : Checkout repository
@@ -676,7 +728,8 @@ jobs:
676728
677729 - name : Create override files for e2e
678730 env :
679- DEPOT_IMAGE_URL : ${{ needs.artifacts.outputs.container-image-url-depot }}
731+ DEPOT_IMAGE_URL : ${{ needs.trusted-artifacts.outputs.container-image-url-depot }}
732+ if : ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
680733 run : |
681734 cat > e2e/docker-compose.override.yaml <<EOF
682735 services:
@@ -695,6 +748,18 @@ jobs:
695748 docker ps -a
696749 docker network ls
697750 echo "### DEBUG"
751+ - name : Build as part of e2e
752+ if : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
753+ run : |
754+ cat > e2e/docker-compose.override.yaml <<EOF
755+ services:
756+ openmeter:
757+ build: ..
758+ sink-worker:
759+ build: ..
760+ EOF
761+
762+ cat e2e/docker-compose.override.yaml
698763
699764 - name : Launch Docker Compose infra
700765 run : docker compose -f docker-compose.infra.yaml -f docker-compose.openmeter.yaml -f docker-compose.override.yaml up -d
0 commit comments