Skip to content

Commit

Permalink
Merge branch 'wojiushixiaobai-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
wojiushixiaobai committed Jan 24, 2024
2 parents d532f9a + d4ba575 commit a9d79e2
Show file tree
Hide file tree
Showing 21 changed files with 242 additions and 419 deletions.
91 changes: 91 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Build

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- '*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
component: [core, koko, lion, kael, chen, magnus, web]
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Get Version
run: |
echo "version=$(basename ${GITHUB_REF})" >> $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push Image
uses: docker/build-push-action@v5
with:
context: .
file: ${{ matrix.component }}/Dockerfile
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
push: true
tags: |
${{ github.repository_owner }}/jms_${{ matrix.component }}:${{ env.version }}
${{ github.repository_owner }}/jms_${{ matrix.component }}:latest
ghcr.io/${{ github.repository_owner }}/jms_${{ matrix.component }}:${{ env.version }}
ghcr.io/${{ github.repository_owner }}/jms_${{ matrix.component }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max

allinone:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
component: [all]
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Get Version
run: |
echo "version=$(basename ${GITHUB_REF})" >> $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push Image
uses: docker/build-push-action@v5
with:
context: ./allinone
file: ./allinone/Dockerfile
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
push: true
tags: |
${{ github.repository_owner }}/jms_${{ matrix.component }}:${{ env.version }}
${{ github.repository_owner }}/jms_${{ matrix.component }}:latest
ghcr.io/${{ github.repository_owner }}/jms_${{ matrix.component }}:${{ env.version }}
ghcr.io/${{ github.repository_owner }}/jms_${{ matrix.component }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
31 changes: 0 additions & 31 deletions .github/workflows/jms-build-test.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ vi .env
```
```vim
# 版本号可以自己根据项目的版本修改
VERSION=v3.10.1
VERSION=v3.10.2
# 构建参数, 支持 amd64/arm64/loong64
TARGETARCH=amd64
Expand Down
Loading

0 comments on commit a9d79e2

Please sign in to comment.