@@ -50,49 +50,26 @@ jobs:
5050 matrix :
5151 group : ${{ fromJson(needs.discover.outputs.matrix) }}
5252 name : Process Jobs for ${{ matrix.group.platform }}
53- outputs :
54- jobs : ${{ toJson(matrix.group.jobs) }} # Direct output definition
5553 steps :
56- - name : No-op step (required to have at least one step)
57- run : echo "no-op"
58-
59- ghcr-upload :
60- needs : process
61- name : Container Upload
62- strategy :
63- fail-fast : false
64- matrix :
65- job : ${{ fromJson(needs.process.outputs.jobs) }}
66- runs-on : ubuntu-latest
67- permissions :
68- contents : read
69- packages : write
70- steps :
71- - name : Free Disk Space (Ubuntu)
72- uses : jlumbroso/free-disk-space@main
73-
74- - name : Install Nix with good defaults
75- uses : cachix/install-nix-action@v20
76- with :
77- extra_nix_config : |
78- trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk=
79- substituters = https://cache.iog.io/ https://cache.zw3rk.com/ https://cache.nixos.org/
80- nix_path : nixpkgs=channel:nixos-unstable
81- - name : Checkout repository
82- uses : actions/checkout@v4
83- - name : Log in to the Container registry
84- 54+ - name : Call Container Upload Workflow
55+ uses : actions/github-script@v6
8556 with :
86- registry : ${{ env.REGISTRY }}
87- username : ${{ github.actor }}
88- password : ${{ secrets.GITHUB_TOKEN }}
89- - name : Compute and upload closure and developer environment to ghcr.io
90- env :
91- DEV_SHELL : ${{ matrix.job.config }}
92- SHELL_NIX_PATH : ${{ matrix.job.build_path }}
93- NIX_STORE_SECRET_KEY : ${{ secrets.SECRET_KEY }}
94- run : ./extra/ghcr-upload.sh
57+ script : |
58+ const platform = ${{ matrix.group.platform }};
59+ const jobs = ${{ matrix.group.jobs }};
60+ console.log(`Calling container-upload workflow for platform: ${platform} with ${jobs.length} jobs`);
9561
62+ await github.rest.actions.createWorkflowDispatch({
63+ owner: context.repo.owner,
64+ repo: context.repo.repo,
65+ workflow_id: 'container-upload.yml', // Filename of the reusable workflow
66+ ref: context.ref, // Or specify a branch/tag
67+ inputs: {
68+ platform: platform,
69+ jobs: JSON.stringify(jobs) // Pass jobs as JSON string
70+ }
71+ });
72+
9673 # codespace-upload:
9774 # env:
9875 # IMAGE_NAME: input-output-hk/devx-devcontainer
0 commit comments