Merge pull request #94 from blockfrost/srk/nixDockerCI
feat(ci): use Nix built docker image
feat(ci): use Nix built docker image
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Publish to Registry
uses: elgohr/[email protected]
- uses: cachix/[email protected]
- name: Nix build docker image
run: |
nix build .#dockerImage
docker load < result
- name: Login to DockerHub
uses: docker/[email protected]
with:
name: blockfrost/backend-ryo
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: "latest,${{ github.event.release.tag_name }}"
- name: Push docker image to DockerHub
run: |
IMG_ID=$( docker images --filter "reference=backend-ryo" --format "{{.ID}}" )
echo "Tagging $IMG_ID"
docker tag $IMG_ID blockfrost/backend-ryo:latest
docker tag $IMG_ID blockfrost/backend-ryo:${{ github.event.release.tag_name }}
docker push blockfrost/backend-ryo:latest
docker push blockfrost/backend-ryo:${{ github.event.release.tag_name }}
- name: Login to ghcr.io
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push docker image to ghcr.io
run: |
IMG_ID=$( docker images --filter "reference=backend-ryo" --format "{{.ID}}" )
echo "Tagging $IMG_ID"
docker tag $IMG_ID ghcr.io/blockfrost/blockfrost-backend-ryo:latest
docker tag $IMG_ID ghcr.io/blockfrost/blockfrost-backend-ryo:${{ github.event.release.tag_name }}
docker push ghcr.io/blockfrost/blockfrost-backend-ryo:latest
docker push ghcr.io/blockfrost/blockfrost-backend-ryo:${{ github.event.release.tag_name }}
- Nix Flake
- Docker image build using Nix `dockerTools`
- Registry published Docker image is now the Nix built one, publish to ghcr.io as well
- cardano-db-sync port to config
- Support for ScriptHash payment credential using `script` addresses.
{
packages = forAllSystems (system: {
inherit (default.${system}) blockfrost-backend-ryo;
dockerImage = legacyPkgs.${system}.dockerTools.buildImage {
name = "blockfrost";
runAsRoot = ''
#!${legacyPkgs.${system}.runtimeShell}
mkdir -p /app
cp -a ${self.packages.${system}.blockfrost-backend-ryo}/libexec/source/config /app/config
dockerImage =
let
configs = legacyPkgs.${system}.runCommand "app-configs" { }
''
mkdir -p $out/app
cp -a ${self.packages.${system}.blockfrost-backend-ryo}/libexec/source/config $out/app/config
'';
config = {
Cmd = [ "${self.packages.${system}.blockfrost-backend-ryo}/bin/blockfrost-backend-ryo" ];
WorkingDir = "/app";
in
legacyPkgs.${system}.dockerTools.buildImage {
name = "backend-ryo";
copyToRoot = [ configs ];
config = {
Cmd = [ "${self.packages.${system}.blockfrost-backend-ryo}/bin/blockfrost-backend-ryo" ];
WorkingDir = "/app";
};
};
};
default = self.packages.${system}.blockfrost-backend-ryo;
});
checks = forAllSystems (system: {
Previous work on the builders/etc updates rust but introduced things caused the WASM to no longer compile. This updates the WASM bindings as well. Includes genesis module that wasn't pushed before.
updatet hackage index
Fix db-sync checks of scripts in reference txin