diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 922babe57b..504c3233ef 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,13 +12,42 @@ on: jobs: # tests: # uses: ./.github/workflows/test.yml - deploy: + # publish: # needs: [tests] + # runs-on: ubuntu-latest + # steps: + # - name: Checkout + # uses: actions/checkout@v3 + + # - name: Install Nix + # uses: cachix/install-nix-action@v20 + # with: + # nix_path: nixpkgs=channel:nixos-unstable + # install_url: https://releases.nixos.org/nix/nix-2.10.3/install + # extra_nix_config: | + # allowed-uris = ${{ env.ALLOWED_URIS }} + # trusted-public-keys = ${{ env.TRUSTED_PUBLIC_KEYS }} + # substituters = ${{ env.SUBSTITUTERS }} + # experimental-features = nix-command flakes + + # - name: Install Skopeo + # run: nix-env -iA skopeo -f '' + + # - name: Login with Skopeo + # run: echo "${{ secrets.GITHUB_TOKEN }}" | skopeo login ghcr.io -u $ --password-stdin + + # - name: Publish Runtime Images + # run: | + # nix build .#oci-images.x86_64-linux.latest.all.copyToRegistry + # ./result/bin/copy-to-registry + + deploy: + strategy: + matrix: + network: [ preview, preprod, mainnet ] + # needs: [publish] runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Install Nix uses: cachix/install-nix-action@v20 with: @@ -30,16 +59,9 @@ jobs: substituters = ${{ env.SUBSTITUTERS }} experimental-features = nix-command flakes - - name: Install Skopeo - run: nix-env -iA skopeo -f '' - - - name: Login with Skopeo - run: echo "${{ secrets.GITHUB_TOKEN }}" | skopeo login ghcr.io -u $ --password-stdin - - - name: Publish Runtime Images + - name: Build nomad chart run: | - nix build .#oci-images.x86_64-linux.latest.all.copyToRegistry - ./result/bin/copy-to-registry + nix build github:input-output-hk/dapps-world#marlowe.marlowe-runtime-${{ matrix.network }}-latest - name: Setup .netrc run: | @@ -48,5 +70,6 @@ jobs: machine api.github.com password ${{ secrets.GITHUB_TOKEN }} EOF -# - name: Deploy to Nomad -# run: nix develop github:input-output-hk/dapps-world#x86_64-linux.automation.devshells.ops -c ./scripts/deploy-nomad + - name: Deploy to Nomad + run: | + nix develop github:input-output-hk/dapps-world#x86_64-linux.automation.devshells.ops -c nomad run result/job