This commit is contained in:
spiritlhl
2024-12-08 09:08:31 +00:00
parent 6dbb171d3b
commit f00d5db69c
2 changed files with 11 additions and 32 deletions

View File

@@ -24,7 +24,14 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
- name: Login to CNB Registry
uses: docker/login-action@v2
with:
registry: ${{ secrets.CNB_DOCKER_REGISTRY }}
username: cnb
password: 34hs1c6a15KgJOVTQ1tGa9AyU3A
- name: Build and push Docker images
uses: docker/build-push-action@v4
with:
context: .
@@ -32,4 +39,6 @@ jobs:
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386,linux/riscv64
# linux/mips,linux/mipsle 暂不支持 alpine, linux/s390x 编译卡死
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/goecs:latest
tags: |
${{ secrets.DOCKER_USERNAME }}/goecs:latest
${{ secrets.CNB_DOCKER_REGISTRY }}/${{ github.repository }}:latest

View File

@@ -1,30 +0,0 @@
name: Push to CNB
on:
push:
branches:
- master
workflow_dispatch:
jobs:
push-to-cnb:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Import to CNB
run: |
docker run --rm \
-e PLUGIN_SOURCE_TOKEN="${{ secrets.GITHUB_TOKEN }}" \
-e PLUGIN_SOURCE_URL="https://github.com" \
-e PLUGIN_SOURCE_PLATFORM="github" \
-e PLUGIN_SOURCE_REPO="oneclickvirt/ecs" \
-e PLUGIN_CNB_ROOT_ORGANIZATION="oneclickvirt" \
-e PLUGIN_CNB_TOKEN="${{ secrets.CNB_TOKEN }}" \
-e PLUGIN_CNB_URL="https://cnb.cool" \
-e PLUGIN_MIGRATE_FORCE_PUSH="true" \
-e PLUGIN_MIGRATE_LOG_LEVEL="debug" \
-v ${{ github.workspace }}:${{ github.workspace }} \
-w ${{ github.workspace }} \
cnbcool/code-import