Skip to content

Commit a8f4202

Browse files
committed
backport version fix
1 parent caf4ff1 commit a8f4202

File tree

12 files changed

+52
-15
lines changed

12 files changed

+52
-15
lines changed

.github/actions/docker-tags/action.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ description: Calculates the docker tags
77
inputs:
88
name:
99
description: The docker image name
10-
default: ${{ github.event.repository.name }}
11-
required: false
10+
required: true
1211
registry-unstable:
1312
description: The unstable registry path
1413
default: europe-docker.pkg.dev/da-images/public-unstable/docker
@@ -39,6 +38,8 @@ runs:
3938
- name: Versions
4039
id: versions
4140
uses: ./.github/actions/versions
41+
with:
42+
name: ${{ inputs.name }}
4243
- name: Calculate Tags
4344
env:
4445
NAME: ${{ inputs.name }}

.github/actions/helm-build-push/action.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ name: Helm Build and Push
55
description: Builds and pushes Helm Charts
66

77
inputs:
8-
chart:
9-
description: The path to the chart
10-
default: charts/${{ github.event.repository.name }}
8+
name:
9+
description: The name of the chart
10+
default: ${{ github.event.repository.name }}
1111
required: true
1212
registry-unstable:
1313
description: The unstable registry path
@@ -42,10 +42,12 @@ runs:
4242
- name: Versions
4343
id: versions
4444
uses: ./.github/actions/versions
45+
with:
46+
name: ${{ inputs.name }}
4547
- name: Helm Build and Push
4648
id: build-push
4749
env:
48-
CHART: ${{ inputs.chart }}
50+
CHART: charts/${{ inputs.name }}
4951
REGISTRY_UNSTABLE: ${{ inputs.registry-unstable }}
5052
REGISTRY_STABLE: ${{ inputs.registry-stable }}
5153
RELEASE_BRANCHES: ${{ inputs.release-branches }}

.github/actions/versions/action.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
name: Versions
55
description: Calculates the current stable and unstable versions
66

7+
inputs:
8+
name:
9+
description: The app to calculate versions for (e.g. wallet-gateway, splice-portfolio)
10+
required: true
11+
712
outputs:
813
unstable:
914
description: The unstable version
@@ -18,4 +23,4 @@ runs:
1823
- name: Calculate Versions
1924
shell: bash
2025
id: calc
21-
run: ${{ github.action_path }}/versions.sh
26+
run: ${{ github.action_path }}/versions.sh ${{ inputs.name }}

.github/actions/versions/versions.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
#! /usr/bin/env bash
22
set -euo pipefail
33

4-
version_file="$(<VERSION)"
4+
name="$1"
5+
6+
if [ -z "${name}" ]; then
7+
echo "missing name argument"
8+
exit 1
9+
fi
10+
11+
version_file="$(<"apps/${name}/VERSION")"
512

613
# Bump the patch version
7-
minor_bump="$(awk -F. '{s=$3; sub(/^[0-9]+/, "", s); print $1"."$2"."($3+1)s}' VERSION)"
14+
minor_bump="$(awk -F. '{s=$3; sub(/^[0-9]+/, "", s); print $1"."$2"."($3+1)s}' "apps/${name}/VERSION")"
815

916
# Get the commit date
1017
commit_date="$(git log -n1 --format=%cd --date=format:%Y%m%d)"

.github/workflows/splice-portfolio.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
- name: Versions
3737
id: versions
3838
uses: ./.github/actions/versions
39+
with:
40+
name: splice-portfolio
3941
- name: Docker Tags
4042
id: tags
4143
uses: ./.github/actions/docker-tags
@@ -54,9 +56,9 @@ jobs:
5456
- name: Docker Build and Publish
5557
uses: docker/build-push-action@v6
5658
with:
57-
file: ./Dockerfile.splice-portfolio
59+
file: ./apps/splice-portfolio/Dockerfile
5860
# Always use the stable version to pull down the npm package
59-
build-args: version=${{ steps.version.outputs.version }}
61+
build-args: version=${{ steps.versions.outputs.stable }}
6062
push: true
6163
platforms: linux/amd64,linux/arm64
6264
tags: ${{ steps.tags.outputs.tags }}

.github/workflows/wallet-gateway.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,13 @@ jobs:
3636
- name: Versions
3737
id: versions
3838
uses: ./.github/actions/versions
39+
with:
40+
name: wallet-gateway
3941
- name: Docker Tags
4042
id: tags
4143
uses: ./.github/actions/docker-tags
4244
with:
45+
name: wallet-gateway
4346
registry-unstable: ghcr.io/digital-asset/wallet-gateway-unstable/docker
4447
registry-stable: ghcr.io/digital-asset/wallet-gateway/docker
4548

@@ -48,7 +51,7 @@ jobs:
4851
uses: docker/build-push-action@v6
4952
id: docker-export
5053
with:
51-
file: ./Dockerfile.wallet-gateway
54+
file: ./apps/wallet-gateway/Dockerfile
5255
# Always use the stable version to pull down the npm package
5356
build-args: version=${{ steps.versions.outputs.stable }}
5457
load: true
@@ -66,9 +69,9 @@ jobs:
6669
- name: Docker Build and Publish
6770
uses: docker/build-push-action@v6
6871
with:
69-
file: ./Dockerfile.wallet-gateway
72+
file: ./apps/wallet-gateway/Dockerfile
7073
# Always use the stable version to pull down the npm package
71-
build-args: version=${{ steps.version.outputs.version }}
74+
build-args: version=${{ steps.versions.outputs.stable }}
7275
push: true
7376
platforms: linux/amd64,linux/arm64
7477
tags: ${{ steps.tags.outputs.tags }}

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
11
# wallet-gateway
22

33
Docker build for the Wallet Gateway
4+
5+
## How to release
6+
7+
Commits on `main` create new release artifacts if they don't already exist yet using the version specified in the `apps/<app>/VERSION` file at the root of the repo
8+
9+
1. Regenerate the values schema if needed:
10+
11+
```
12+
helm-get {chart name}
13+
```
14+
15+
**NOTE:** In the case of `wallet-gateway`, most of its schema is derived from internal configuration. So even if there are no values changes in this repo you most likely will still need to regenerate the values schema.
16+
17+
2. Bump the relevant `apps/<app>/VERSION` file
18+
3. Create a PR, have it approved, and merge it into `main`

apps/splice-portfolio/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.20.0

0 commit comments

Comments
 (0)