Skip to content

Commit 495c456

Browse files
authored
Merge pull request #2949 from sourcenetwork/release/0.13.0
Release v0.13.0
2 parents 1f9c3ee + f9e3be6 commit 495c456

File tree

749 files changed

+37462
-25688
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

749 files changed

+37462
-25688
lines changed

.github/workflows/release.yml

Lines changed: 46 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -43,30 +43,11 @@ jobs:
4343
cache: false
4444

4545
- name: Apply tag
46-
run: git tag ${{ github.event.inputs.tag }}
46+
run: git tag v${{ github.event.inputs.tag }}
4747

4848
- name: Build modules
4949
run: make deps:modules
5050

51-
- name: Set up QEMU
52-
if: matrix.os == 'ubuntu-latest'
53-
uses: docker/setup-qemu-action@v3
54-
55-
- name: Log in to Docker Hub
56-
if: matrix.os == 'ubuntu-latest'
57-
uses: docker/login-action@v3
58-
with:
59-
username: ${{ secrets.DOCKER_USERNAME }}
60-
password: ${{ secrets.DOCKER_PASSWORD }}
61-
62-
- name: Log in to the Container registry
63-
if: matrix.os == 'ubuntu-latest'
64-
uses: docker/login-action@v3
65-
with:
66-
registry: ghcr.io
67-
username: ${{ github.actor }}
68-
password: ${{ secrets.GITHUB_TOKEN }}
69-
7051
- name: Run command to get SHA environment
7152
shell: bash
7253
run: echo "sha_short=$(git rev-parse --short HEAD)" >> ${GITHUB_ENV}
@@ -114,7 +95,7 @@ jobs:
11495
fetch-depth: 0
11596

11697
- name: Apply tag
117-
run: git tag ${{ github.event.inputs.tag }}
98+
run: git tag v${{ github.event.inputs.tag }}
11899

119100
- name: Setup Go environment explicitly
120101
uses: actions/setup-go@v5
@@ -123,12 +104,6 @@ jobs:
123104
check-latest: true
124105
cache: false
125106

126-
- name: Log in to Docker Hub
127-
uses: docker/login-action@v3
128-
with:
129-
username: ${{ secrets.DOCKER_USERNAME }}
130-
password: ${{ secrets.DOCKER_PASSWORD }}
131-
132107
- name: Run command to get SHA environment
133108
shell: bash
134109
run: echo "sha_short=$(git rev-parse --short HEAD)" >> ${GITHUB_ENV}
@@ -179,17 +154,58 @@ jobs:
179154
GITHUB_REPOSITORY: ${{ github.repository }}
180155
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
181156

157+
docker-build-push:
158+
name: Build and push Docker image
159+
runs-on: ubuntu-latest
160+
steps:
161+
- name: Checkout code into the directory
162+
uses: actions/checkout@v4
163+
with:
164+
fetch-depth: 0
165+
166+
- name: Set up QEMU
167+
uses: docker/setup-qemu-action@v3
168+
169+
- name: Set up Docker Buildx
170+
uses: docker/setup-buildx-action@v3
171+
172+
- name: Login to Docker Hub
173+
uses: docker/login-action@v3
174+
with:
175+
username: ${{ secrets.DOCKER_USERNAME }}
176+
password: ${{ secrets.DOCKER_PASSWORD }}
177+
178+
- name: Login to GitHub Container Registry
179+
uses: docker/login-action@v3
180+
with:
181+
registry: ghcr.io
182+
username: ${{ github.actor }}
183+
password: ${{ secrets.GITHUB_TOKEN }}
184+
185+
- name: Build and push
186+
uses: docker/build-push-action@v6
187+
with:
188+
context: .
189+
file: tools/defradb.containerfile
190+
platforms: linux/amd64,linux/arm64
191+
push: true
192+
tags: |
193+
${{ github.repository_owner }}/defradb:latest
194+
${{ github.repository_owner }}/defradb:${{ github.event.inputs.tag }}
195+
ghcr.io/${{ github.repository_owner }}/defradb:latest
196+
ghcr.io/${{ github.repository_owner }}/defradb:${{ github.event.inputs.tag }}
197+
182198
pull-docker-image:
183199
name: Pull docker image job
184200
runs-on: ubuntu-latest
185-
needs: prepare
201+
needs: docker-build-push
186202

187203
strategy:
188204
fail-fast: false
189205
matrix:
190206
image_tag:
191-
- sourcenetwork/defradb:latest
192-
- ghcr.io/sourcenetwork/defradb:latest
207+
- ${{ github.repository_owner }}/defradb:latest
208+
- ghcr.io/${{ github.repository_owner }}/defradb:latest
193209

194210
steps:
195211
- name: Log in to Docker Hub

.github/workflows/test-and-upload-coverage.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,31 +35,57 @@ jobs:
3535
database-type: [badger-file, badger-memory]
3636
mutation-type: [gql, collection-named, collection-save]
3737
lens-type: [wasm-time]
38+
acp-type: [local]
3839
database-encryption: [false]
3940
include:
4041
- os: ubuntu-latest
4142
client-type: go
4243
database-type: badger-memory
4344
mutation-type: collection-save
4445
lens-type: wasm-time
46+
acp-type: local
4547
database-encryption: true
4648
- os: ubuntu-latest
4749
client-type: go
4850
database-type: badger-memory
4951
mutation-type: collection-save
5052
lens-type: wazero
53+
acp-type: local
5154
database-encryption: false
5255
- os: ubuntu-latest
5356
client-type: go
5457
database-type: badger-memory
5558
mutation-type: collection-save
5659
lens-type: wasmer
60+
acp-type: local
61+
database-encryption: false
62+
- os: ubuntu-latest
63+
client-type: go
64+
database-type: badger-memory
65+
mutation-type: collection-save
66+
lens-type: wasm-time
67+
acp-type: source-hub
68+
database-encryption: false
69+
- os: ubuntu-latest
70+
client-type: http
71+
database-type: badger-memory
72+
mutation-type: collection-save
73+
lens-type: wasm-time
74+
acp-type: source-hub
75+
database-encryption: false
76+
- os: ubuntu-latest
77+
client-type: cli
78+
database-type: badger-memory
79+
mutation-type: collection-save
80+
lens-type: wasm-time
81+
acp-type: source-hub
5782
database-encryption: false
5883
- os: macos-latest
5984
client-type: go
6085
database-type: badger-memory
6186
mutation-type: collection-save
6287
lens-type: wasm-time
88+
acp-type: local
6389
database-encryption: false
6490
## TODO: https://github.com/sourcenetwork/defradb/issues/2080
6591
## Uncomment the lines below to Re-enable the windows build once this todo is resolved.
@@ -68,6 +94,7 @@ jobs:
6894
## database-type: badger-memory
6995
## mutation-type: collection-save
7096
## lens-type: wasm-time
97+
## acp-type: local
7198
## database-encryption: false
7299

73100
runs-on: ${{ matrix.os }}
@@ -87,6 +114,7 @@ jobs:
87114
DEFRA_BADGER_ENCRYPTION: ${{ matrix.database-encryption }}
88115
DEFRA_MUTATION_TYPE: ${{ matrix.mutation-type }}
89116
DEFRA_LENS_TYPE: ${{ matrix.lens-type }}
117+
DEFRA_ACP_TYPE: ${{ matrix.acp-type }}
90118

91119
steps:
92120
- name: Checkout code into the directory
@@ -143,6 +171,23 @@ jobs:
143171
make deps:modules
144172
make deps:test
145173
174+
# We have to checkout the source-hub repo and install it ourselves because it
175+
# contains replace commands in its go.mod file.
176+
- name: Checkout sourcehub code into the directory
177+
if: ${{ matrix.acp-type == 'source-hub' }}
178+
uses: actions/checkout@v4
179+
with:
180+
repository: sourcenetwork/sourcehub
181+
path: _sourceHub
182+
# Lock the sourcehub version until the dev branch is stable
183+
# remove this when closed https://github.com/sourcenetwork/defradb/issues/2865
184+
ref: c232133c35c96924509a4d955a7b450eb3624a15
185+
186+
- name: Install SourceHub CLI
187+
if: ${{ matrix.acp-type == 'source-hub' }}
188+
working-directory: _sourceHub
189+
run: make install
190+
146191
- name: Run integration tests
147192
run: make test:coverage
148193

@@ -158,6 +203,7 @@ jobs:
158203
_${{ matrix.database-type }}\
159204
_${{ matrix.mutation-type }}\
160205
_${{ matrix.lens-type }}\
206+
_${{ matrix.acp-type }}\
161207
_${{ matrix.database-encryption }}\
162208
"
163209
path: coverage.txt

.goreleaser.yaml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -97,23 +97,3 @@ milestones:
9797
- close: true
9898
fail_on_error: false
9999
name_template: "DefraDB v{{ .Major }}.{{ .Minor }}"
100-
101-
dockers:
102-
- ids:
103-
- "defradb_playground"
104-
image_templates:
105-
- "{{ .Env.GITHUB_REPOSITORY }}:latest"
106-
- "{{ .Env.GITHUB_REPOSITORY }}:{{ .Version }}"
107-
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:latest"
108-
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:{{ .Version }}"
109-
use: buildx
110-
build_flag_templates:
111-
- "--pull"
112-
- "--label=org.opencontainers.image.description=DefraDB is a Peer-to-Peer Edge Database."
113-
- "--label=org.opencontainers.image.created={{ .Date }}"
114-
- "--label=org.opencontainers.image.name={{ .ProjectName }}"
115-
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
116-
- "--label=org.opencontainers.image.version={{ .Version }}"
117-
- "--label=org.opencontainers.image.source={{ .GitURL }}"
118-
- "--platform=linux/amd64"
119-
dockerfile: ./tools/goreleaser.containerfile

0 commit comments

Comments
 (0)