Skip to content

Commit ecef4f1

Browse files
committed
Merge remote-tracking branch 'origin/main' into dev
# Conflicts: # docs/release/LICENSE # internal/service/notification/new_question_notification_test.go
2 parents 9df5853 + 3b9f137 commit ecef4f1

34 files changed

Lines changed: 421 additions & 182 deletions

.github/workflows/build-image-for-latest-release.yml

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -35,32 +35,29 @@ jobs:
3535
- name: Checkout
3636
uses: actions/checkout@v4
3737

38-
- name: Docker meta
39-
id: meta
40-
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
41-
with:
42-
images: apache/answer
43-
tags: |
44-
type=raw,value=latest
45-
4638
- name: Set up QEMU
47-
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
39+
run: |
40+
sudo apt-get update
41+
sudo apt-get install -y qemu-user-static
4842
4943
- name: Set up Docker Buildx
50-
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
44+
run: |
45+
docker buildx create --name answer-builder --driver docker-container --use
46+
docker buildx inspect --bootstrap
5147
5248
- name: Login to DockerHub
53-
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
54-
with:
55-
username: ${{ secrets.DOCKERHUB_USER }}
56-
password: ${{ secrets.DOCKERHUB_TOKEN }}
49+
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login --username "${{ secrets.DOCKERHUB_USER }}" --password-stdin
5750

5851
- name: Build and push
59-
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
60-
with:
61-
context: .
62-
platforms: linux/amd64,linux/arm64
63-
push: true
64-
file: ./Dockerfile
65-
tags: ${{ steps.meta.outputs.tags }}
66-
labels: ${{ steps.meta.outputs.labels }}
52+
run: |
53+
BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
54+
docker buildx build \
55+
--file ./Dockerfile \
56+
--platform linux/amd64,linux/arm64 \
57+
--push \
58+
--tag apache/answer:latest \
59+
--label org.opencontainers.image.created="${BUILD_DATE}" \
60+
--label org.opencontainers.image.revision="${GITHUB_SHA}" \
61+
--label org.opencontainers.image.source="https://github.com/${GITHUB_REPOSITORY}" \
62+
--label org.opencontainers.image.version="${GITHUB_REF_NAME#v}" \
63+
.

.github/workflows/build-image-for-manual.yml

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,33 +33,29 @@ jobs:
3333
- name: Checkout
3434
uses: actions/checkout@v4
3535

36-
- name: Docker meta
37-
id: meta
38-
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
39-
with:
40-
images: apache/answer
41-
tags: |
42-
type=ref,enable=true,priority=600,prefix=,suffix=,event=branch
43-
type=semver,pattern={{version}}
44-
4536
- name: Set up QEMU
46-
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
37+
run: |
38+
sudo apt-get update
39+
sudo apt-get install -y qemu-user-static
4740
4841
- name: Set up Docker Buildx
49-
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
42+
run: |
43+
docker buildx create --name answer-builder --driver docker-container --use
44+
docker buildx inspect --bootstrap
5045
5146
- name: Login to DockerHub
52-
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
53-
with:
54-
username: ${{ secrets.DOCKERHUB_USER }}
55-
password: ${{ secrets.DOCKERHUB_TOKEN }}
47+
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login --username "${{ secrets.DOCKERHUB_USER }}" --password-stdin
5648

5749
- name: Build and push
58-
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
59-
with:
60-
context: .
61-
platforms: linux/amd64,linux/arm64
62-
push: true
63-
file: ./Dockerfile
64-
tags: apache/answer:${{ inputs.tag_name }}
65-
labels: ${{ steps.meta.outputs.labels }}
50+
run: |
51+
BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
52+
docker buildx build \
53+
--file ./Dockerfile \
54+
--platform linux/amd64,linux/arm64 \
55+
--push \
56+
--tag "apache/answer:${{ inputs.tag_name }}" \
57+
--label org.opencontainers.image.created="${BUILD_DATE}" \
58+
--label org.opencontainers.image.revision="${GITHUB_SHA}" \
59+
--label org.opencontainers.image.source="https://github.com/${GITHUB_REPOSITORY}" \
60+
--label org.opencontainers.image.version="${{ inputs.tag_name }}" \
61+
.

.github/workflows/build-image-for-release.yml

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -34,33 +34,31 @@ jobs:
3434
- name: Checkout
3535
uses: actions/checkout@v4
3636

37-
- name: Docker meta
38-
id: meta
39-
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
40-
with:
41-
images: apache/answer
42-
tags: |
43-
type=ref,enable=true,priority=600,prefix=,suffix=,event=branch
44-
type=semver,pattern={{version}}
45-
4637
- name: Set up QEMU
47-
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
38+
run: |
39+
sudo apt-get update
40+
sudo apt-get install -y qemu-user-static
4841
4942
- name: Set up Docker Buildx
50-
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
43+
run: |
44+
docker buildx create --name answer-builder --driver docker-container --use
45+
docker buildx inspect --bootstrap
5146
5247
- name: Login to DockerHub
53-
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
54-
with:
55-
username: ${{ secrets.DOCKERHUB_USER }}
56-
password: ${{ secrets.DOCKERHUB_TOKEN }}
48+
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login --username "${{ secrets.DOCKERHUB_USER }}" --password-stdin
5749

5850
- name: Build and push
59-
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
60-
with:
61-
context: .
62-
platforms: linux/amd64,linux/arm64
63-
push: true
64-
file: ./Dockerfile
65-
tags: ${{ steps.meta.outputs.tags }}
66-
labels: ${{ steps.meta.outputs.labels }}
51+
env:
52+
IMAGE_TAG: ${{ github.ref_name }}
53+
run: |
54+
BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
55+
docker buildx build \
56+
--file ./Dockerfile \
57+
--platform linux/amd64,linux/arm64 \
58+
--push \
59+
--tag "apache/answer:${IMAGE_TAG#v}" \
60+
--label org.opencontainers.image.created="${BUILD_DATE}" \
61+
--label org.opencontainers.image.revision="${GITHUB_SHA}" \
62+
--label org.opencontainers.image.source="https://github.com/${GITHUB_REPOSITORY}" \
63+
--label org.opencontainers.image.version="${IMAGE_TAG#v}" \
64+
.

.github/workflows/build-image-for-test.yml

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,32 +30,23 @@ jobs:
3030
- name: Checkout
3131
uses: actions/checkout@v4
3232

33-
- name: Docker meta
34-
id: meta
35-
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
36-
with:
37-
images: apache/answer
38-
tags: |
39-
type=raw,value=test
40-
41-
- name: Set up QEMU
42-
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
33+
- name: Login to DockerHub
34+
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login --username "${{ secrets.DOCKERHUB_USER }}" --password-stdin
4335

4436
- name: Set up Docker Buildx
45-
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
46-
47-
- name: Login to DockerHub
48-
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
49-
with:
50-
username: ${{ secrets.DOCKERHUB_USER }}
51-
password: ${{ secrets.DOCKERHUB_TOKEN }}
37+
run: |
38+
docker buildx create --name answer-builder --driver docker-container --use
39+
docker buildx inspect --bootstrap
5240
5341
- name: Build and push
54-
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
55-
with:
56-
context: .
57-
file: ./Dockerfile
58-
platforms: linux/amd64
59-
push: true
60-
tags: ${{ steps.meta.outputs.tags }}
61-
labels: ${{ steps.meta.outputs.labels }}
42+
run: |
43+
BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
44+
docker buildx build \
45+
--file ./Dockerfile \
46+
--platform linux/amd64 \
47+
--push \
48+
--tag apache/answer:test \
49+
--label org.opencontainers.image.created="${BUILD_DATE}" \
50+
--label org.opencontainers.image.revision="${GITHUB_SHA}" \
51+
--label org.opencontainers.image.source="https://github.com/${GITHUB_REPOSITORY}" \
52+
.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
FROM golang:1.24-alpine AS golang-builder
18+
FROM golang:1.25-alpine AS golang-builder
1919
LABEL maintainer="linkinstar@apache.org"
2020

2121
ARG GOPROXY

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.PHONY: build clean ui
22

3-
VERSION=2.0.1
3+
VERSION=2.0.2
44
BIN=answer
55
DIR_SRC=./cmd/answer
66
DOCKER_CMD=docker

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To learn more about the project, visit [answer.apache.org](https://answer.apache
2323
### Running with docker
2424

2525
```bash
26-
docker run -d -p 9080:80 -v answer-data:/data --name answer apache/answer:2.0.1
26+
docker run -d -p 9080:80 -v answer-data:/data --name answer apache/answer:2.0.2
2727
```
2828

2929
For more information, see [Installation](https://answer.apache.org/docs/installation).

cmd/wire_gen.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/release/LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ The following components are provided under the MIT License. See project link fo
265265
(MIT License) Masterminds-semver (https://github.com/Masterminds/semver) [link](./licenses/LICENSE-Masterminds-semver.txt)
266266
(MIT License) mattn-go-sqlite3 (https://github.com/mattn/go-sqlite3) [link](./licenses/LICENSE-mattn-go-sqlite3.txt)
267267
(MIT License) mozillazg-go-pinyin (https://github.com/mozillazg/go-pinyin) [link](./licenses/LICENSE-mozillazg-go-pinyin.txt)
268+
(MIT License) mozillazg-go-unidecode (https://github.com/mozillazg/go-unidecode) [link](./licenses/LICENSE-mozillazg-go-unidecode.txt)
268269
(MIT License) next-share (https://github.com/Bunlong/next-share) [link](./licenses/LIcENSE-Bunlong-next-share.txt)
269270
(MIT License) node-qrcode (https://github.com/soldair/node-qrcode) [link](./licenses/LICENSE-soldair-qrcode.txt)
270271
(MIT License) react (https://github.com/facebook/react) [link](./licenses/LICENSE-facebook-react.txt)

go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
module github.com/apache/answer
1919

20-
go 1.24.0
20+
go 1.25.0
2121

2222
require (
2323
github.com/Machiel/slugify v1.0.1
@@ -62,11 +62,10 @@ require (
6262
github.com/tidwall/gjson v1.17.3
6363
github.com/yuin/goldmark v1.7.4
6464
go.uber.org/mock v0.6.0
65-
golang.org/x/crypto v0.41.0
65+
golang.org/x/crypto v0.53.0
6666
golang.org/x/image v0.20.0
67-
golang.org/x/net v0.43.0
68-
golang.org/x/term v0.34.0
69-
golang.org/x/text v0.28.0
67+
golang.org/x/term v0.44.0
68+
golang.org/x/text v0.39.0
7069
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
7170
gopkg.in/yaml.v3 v3.0.1
7271
modernc.org/sqlite v1.33.0
@@ -171,8 +170,9 @@ require (
171170
go.uber.org/zap v1.27.0 // indirect
172171
golang.org/x/arch v0.10.0 // indirect
173172
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
174-
golang.org/x/sys v0.35.0 // indirect
175-
golang.org/x/tools v0.36.0 // indirect
173+
golang.org/x/net v0.56.0 // indirect
174+
golang.org/x/sys v0.46.0 // indirect
175+
golang.org/x/tools v0.47.0 // indirect
176176
google.golang.org/protobuf v1.34.2 // indirect
177177
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
178178
gopkg.in/ini.v1 v1.67.0 // indirect

0 commit comments

Comments
 (0)