Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .github/workflows/build.yaml

This file was deleted.

76 changes: 76 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: ci
on:
- push
env:
TARGET: ${{ github.ref == 'refs/heads/main' && 'wallet-gateway' || 'wallet-gateway-unstable' }}
defaults:
run:
shell: nix-shell --run "exec bash -euo pipefail {0}"

jobs:
check:
runs-on: digital-asset-wallet-gateway
permissions:
contents: read
issues: read
checks: write
steps:
- uses: actions/checkout@v5
- name: Check schema
run: |
make generate
out="$(git status --porcelain)"
if [ ! -z "${out}" ]; then
echo "Helm schema needs to be re-generated, please run 'make generate'"
echo "${out}"
exit 1
fi
echo "No changes"
- name: Helm unittests
run: make test

docker-build-and-publish:
runs-on: digital-asset-wallet-gateway
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v5
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get Version
id: version
run: echo "version=$(<VERSION)" | tee -a "${GITHUB_OUTPUT}"
- name: Docker Build and Publish
uses: docker/build-push-action@v6
with:
build-args: version=${{ steps.version.outputs.version }}
push: true
tags: ghcr.io/digital-asset/${{ env.TARGET }}/docker/wallet-gateway:v${{ steps.version.outputs.version }}

helm-publish:
runs-on: digital-asset-wallet-gateway
permissions:
contents: read
packages: write
needs:
- check
- docker-build-and-publish
steps:
- uses: actions/checkout@v5
- name: Get Version
id: version
run: echo "version=$(<VERSION)" | tee -a "${GITHUB_OUTPUT}"
- name: Helm package
run: make package
- name: Archive helm package
uses: actions/upload-artifact@v4
with:
name: helm package
path: target/wallet-gateway-${{ steps.version.outputs.version }}.tgz
- name: Helm push
run: helm push --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} target/wallet-gateway-${{ steps.version.outputs.version }}.tgz oci://ghcr.io/digital-asset/${{ env.TARGET }}/helm/wallet-gateway
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ FROM node:24.9.0-alpine3.22
ARG version=REQUIRED
USER node:node
WORKDIR /app
RUN npm --loglevel silly install @canton-network/wallet-gateway-remote@${version}
RUN npm install @canton-network/wallet-gateway-remote@${version}
ENTRYPOINT ["./node_modules/.bin/wallet-gateway-remote"]