Skip to content

Commit

Permalink
CI: 优化 CI, 增加 rc beta build
Browse files Browse the repository at this point in the history
  • Loading branch information
soxft committed Aug 2, 2024
1 parent 6c3d33a commit 2ea89a3
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 52 deletions.
Original file line number Diff line number Diff line change
@@ -1,60 +1,11 @@
name: Docker Image CI
name: build and release

on:
push:
tags:
- "v*.*.*"

jobs:
docker-hub:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: xcsoft
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
-
name: Set up Docker Build Context
uses: docker/setup-buildx-action@v3
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: xcsoft/busuanzi:${{ github.ref_name }}

github-docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Build Context
uses: docker/setup-buildx-action@v3

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/soxft/busuanzi:${{ github.ref_name }}

build:
runs-on: ubuntu-latest
steps:
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Docker Image CI

on:
push:
tags:
- "v*.*.*"
- "*-rc"
- "*-beta"
- "*-test"

jobs:
docker-hub:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: xcsoft
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
-
name: Set up Docker Build Context
uses: docker/setup-buildx-action@v3
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: xcsoft/busuanzi:${{ github.ref_name }}

github-docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Build Context
uses: docker/setup-buildx-action@v3

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/soxft/busuanzi:${{ github.ref_name }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Build Test
name: Docker / Build Test

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
var (
configPath string
DistPath string
VERSION = "2.8.0"
VERSION = "2.8.1"
)

func Init() {
Expand Down

0 comments on commit 2ea89a3

Please sign in to comment.