Skip to content

Commit

Permalink
Merge branch 'master' into official-es
Browse files Browse the repository at this point in the history
  • Loading branch information
logica0419 committed Oct 12, 2023
2 parents dce9c7a + eca6c60 commit 2cda8fd
Show file tree
Hide file tree
Showing 46 changed files with 1,495 additions and 340 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Read Go version
run: echo "GO_VERSION=$(cat ./.go-version)" >> $GITHUB_ENV
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: "./go.mod"
- run: go mod download
- run: make traQ
- uses: actions/upload-artifact@v3
Expand All @@ -27,12 +25,10 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Read Go version
run: echo "GO_VERSION=$(cat ./.go-version)" >> $GITHUB_ENV
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: "./go.mod"
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand All @@ -51,12 +47,10 @@ jobs:
ports:
- 3306:3306
steps:
- uses: actions/checkout@v3
- name: Read Go version
run: echo "GO_VERSION=$(cat ./.go-version)" >> $GITHUB_ENV
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: "./go.mod"
- name: Run tests
run: |
export TRAQ_IMAGEMAGICK=`which convert`
Expand Down Expand Up @@ -84,7 +78,7 @@ jobs:
ports:
- 3306:3306
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: traQ
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@ jobs:
name: Build Docker Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set TRAQ_VERSION env
run: echo "TRAQ_VERSION=master-SNAPSHOT" >> $GITHUB_ENV
- name: Set TRAQ_REVISION env
run: echo "TRAQ_REVISION=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Show available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: traptitech
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
push: true
Expand All @@ -50,11 +50,11 @@ jobs:
runs-on: ubuntu-latest
needs: [image]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Pull docker image
run: docker pull ghcr.io/traptitech/${IMAGE_NAME}:${IMAGE_TAG}
- name: Container image scan
uses: crazy-max/ghaction-container-scan@v2
uses: crazy-max/ghaction-container-scan@v3
with:
image: ghcr.io/traptitech/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
annotations: true
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,28 @@ jobs:
steps:
- name: Set IMAGE_TAG env
run: echo "IMAGE_TAG=$(echo ${GITHUB_REF:11})" >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set TRAQ_VERSION env
run: echo "TRAQ_VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Set TRAQ_REVISION env
run: echo "TRAQ_REVISION=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Show available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: traptitech
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
push: true
Expand All @@ -52,17 +52,15 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# goreleaserがchangelogを生成する用
fetch-depth: 0
- name: Read Go version
run: echo "GO_VERSION=$(cat ./.go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: "./go.mod"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v5
with:
args: release --rm-dist
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/swagger-change.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
- name: Install spectral
Expand Down
1 change: 0 additions & 1 deletion .go-version

This file was deleted.

4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.20.5-alpine AS build
FROM --platform=$BUILDPLATFORM golang:1.21.3-alpine AS build
WORKDIR /go/src/github.com/traPtitech/traQ

COPY ./go.* ./
Expand All @@ -19,7 +19,7 @@ ENV GOARCH=$TARGETARCH
RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/tmp/go/cache \
go build -o /traQ -ldflags "-s -w -X main.version=$TRAQ_VERSION -X main.revision=$TRAQ_REVISION"

FROM alpine:3.18.2
FROM alpine:3.18.4
WORKDIR /app

RUN apk add --no-cache --update ca-certificates imagemagick && \
Expand Down
2 changes: 1 addition & 1 deletion docs/v3-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4874,7 +4874,7 @@ components:
twitterId:
type: string
description: Twitter ID
pattern: '^[a-zA-Z0-9_]{1,15}$'
pattern: '^[a-zA-Z0-9_]{0,15}$'
lastOnline:
type: string
description: 最終オンライン日時
Expand Down

0 comments on commit 2cda8fd

Please sign in to comment.