mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
chore(ci): update
This commit is contained in:
parent
0082fb7dec
commit
a4c5e63634
26
.github/workflows/build-docker-image.yml
vendored
26
.github/workflows/build-docker-image.yml
vendored
@ -62,19 +62,19 @@ jobs:
|
|||||||
username: ${{ secrets.ALI_DOCKER_USERNAME }}
|
username: ${{ secrets.ALI_DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.ALI_DOCKER_PASSWORD }}
|
password: ${{ secrets.ALI_DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Login to Aliyun Container Registry (Public)
|
# - name: Login to Aliyun Container Registry (Public)
|
||||||
uses: docker/login-action@v2
|
# uses: docker/login-action@v2
|
||||||
with:
|
# with:
|
||||||
registry: ${{ secrets.ALI_DOCKER_PUBLIC_REGISTRY }}
|
# registry: ${{ secrets.ALI_DOCKER_PUBLIC_REGISTRY }}
|
||||||
username: ${{ secrets.ALI_DOCKER_USERNAME }}
|
# username: ${{ secrets.ALI_DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.ALI_DOCKER_PASSWORD }}
|
# password: ${{ secrets.ALI_DOCKER_PASSWORD }}
|
||||||
|
#
|
||||||
- name: Login to Docker Hub
|
# - name: Login to Docker Hub
|
||||||
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next'
|
# if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next'
|
||||||
uses: docker/login-action@v2
|
# uses: docker/login-action@v2
|
||||||
with:
|
# with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
# username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
# password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Set tags
|
- name: Set tags
|
||||||
id: set-tags
|
id: set-tags
|
||||||
|
17
.github/workflows/release.yml
vendored
17
.github/workflows/release.yml
vendored
@ -115,9 +115,9 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ github.ref_name }}" =~ "beta" ]]; then
|
if [[ "${{ github.ref_name }}" =~ "beta" ]]; then
|
||||||
echo "defaultTag=$(echo 'latest')" >> $GITHUB_OUTPUT
|
echo "branch=$(echo 'main')" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "defaultTag=$(echo 'next')" >> $GITHUB_OUTPUT
|
echo "branch=$(echo 'next')" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -147,10 +147,19 @@ jobs:
|
|||||||
registry: ${{ secrets.ALI_DOCKER_PUBLIC_REGISTRY }}
|
registry: ${{ secrets.ALI_DOCKER_PUBLIC_REGISTRY }}
|
||||||
username: ${{ secrets.ALI_DOCKER_USERNAME }}
|
username: ${{ secrets.ALI_DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.ALI_DOCKER_PASSWORD }}
|
password: ${{ secrets.ALI_DOCKER_PASSWORD }}
|
||||||
- name: Build and push
|
- name: Build and push main
|
||||||
|
if: ${{ steps.get-info.outputs.branch == 'main' }}
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
context: ./docker/nocobase
|
context: ./docker/nocobase
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: nocobase/nocobase:${{ steps.get-info.outputs.defaultTag }},${{ steps.meta.outputs.tags }},${{ secrets.ALI_DOCKER_PUBLIC_REGISTRY }}/nocobase/nocobase:${{ steps.get-info.outputs.defaultTag }},${{ secrets.ALI_DOCKER_PUBLIC_REGISTRY }}/${{ steps.meta.outputs.tags }}
|
tags: nocobase/nocobase:main,nocobase/nocobase:latest,${{ steps.meta.outputs.tags }},${{ secrets.ALI_DOCKER_PUBLIC_REGISTRY }}/nocobase/nocobase:main,${{ secrets.ALI_DOCKER_PUBLIC_REGISTRY }}/nocobase/nocobase:latest,${{ secrets.ALI_DOCKER_PUBLIC_REGISTRY }}/${{ steps.meta.outputs.tags }}
|
||||||
|
- name: Build and push next
|
||||||
|
if: ${{ steps.get-info.outputs.branch == 'next' }}
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
context: ./docker/nocobase
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: nocobase/nocobase:next,${{ steps.meta.outputs.tags }},${{ secrets.ALI_DOCKER_PUBLIC_REGISTRY }}/nocobase/nocobase:next,${{ secrets.ALI_DOCKER_PUBLIC_REGISTRY }}/${{ steps.meta.outputs.tags }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user