mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-06-10 20:04:06 +08:00
优化github build
This commit is contained in:
parent
9f27aaac42
commit
3ea07739d1
17
.github/workflows/build.yml
vendored
17
.github/workflows/build.yml
vendored
@ -6,9 +6,12 @@ on:
|
||||
- main
|
||||
- dev
|
||||
- 'feat/**'
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
env:
|
||||
IMAGE_FQDN: registry.cn-hangzhou.aliyuncs.com/playedu/api
|
||||
IMAGE_TAG: ''
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
@ -33,4 +36,16 @@ jobs:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.IMAGE_FQDN }}:1.4
|
||||
${{ env.IMAGE_FQDN }}:${{ env.IMAGE_TAG }}
|
||||
env:
|
||||
IMAGE_TAG: ${{ startsWith(github.ref, 'refs/heads/main') && 'latest' || startsWith(github.ref, 'refs/heads/dev') && 'dev' || github.ref_slug }}
|
||||
if: startsWith(github.ref, 'refs/heads/')
|
||||
- name: Build with Tag
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.IMAGE_FQDN }}:${{ github.ref }}
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
|
Loading…
x
Reference in New Issue
Block a user