Skip to content

Commit

Permalink
Add deploy job
Browse files Browse the repository at this point in the history
  • Loading branch information
jhbertra committed Mar 17, 2023
1 parent d15a559 commit a8ddaea
Showing 1 changed file with 38 additions and 15 deletions.
53 changes: 38 additions & 15 deletions .github/workflows/deploy.yml
Expand Up @@ -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 '<nixpkgs>'

# - 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:
Expand All @@ -30,16 +59,9 @@ jobs:
substituters = ${{ env.SUBSTITUTERS }}
experimental-features = nix-command flakes
- name: Install Skopeo
run: nix-env -iA skopeo -f '<nixpkgs>'

- 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: |
Expand All @@ -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

0 comments on commit a8ddaea

Please sign in to comment.