feat: 优化MySQL发布工作流,移除Docker Buildx和QEMU设置步骤
This commit is contained in:
1 parent
b5d0798ee9
commit
7bed641508
1 file changed
+18
-16
@@ -7,23 +7,25 @@ jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Login to CCR
|
||||
run: |
|
||||
echo "${{ secrets.TENCENT_CCR_PASSWORD }}" | docker login ccr.ccs.tencentyun.com --username="${{ secrets.TENCENT_CCR_USERNAME }}" --password-stdin
|
||||
|
||||
- name: Build and push
|
||||
|
||||
- name: Pull and push AMD64
|
||||
run: |
|
||||
docker buildx create --use
|
||||
docker buildx build \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--tag ccr.ccs.tencentyun.com/cedar-v/mysql:8.0 \
|
||||
--push \
|
||||
- << EOF
|
||||
FROM mysql:8.0
|
||||
EOF
|
||||
docker pull mysql:8.0 --platform linux/amd64
|
||||
docker tag mysql:8.0 ccr.ccs.tencentyun.com/cedar-v/mysql:8.0-amd64
|
||||
docker push ccr.ccs.tencentyun.com/cedar-v/mysql:8.0-amd64
|
||||
|
||||
- name: Pull and push ARM64
|
||||
run: |
|
||||
docker pull mysql:8.0 --platform linux/arm64
|
||||
docker tag mysql:8.0 ccr.ccs.tencentyun.com/cedar-v/mysql:8.0-arm64
|
||||
docker push ccr.ccs.tencentyun.com/cedar-v/mysql:8.0-arm64
|
||||
|
||||
- name: Create and push manifest
|
||||
run: |
|
||||
docker manifest create ccr.ccs.tencentyun.com/cedar-v/mysql:8.0 \
|
||||
ccr.ccs.tencentyun.com/cedar-v/mysql:8.0-amd64 \
|
||||
ccr.ccs.tencentyun.com/cedar-v/mysql:8.0-arm64
|
||||
docker manifest push ccr.ccs.tencentyun.com/cedar-v/mysql:8.0
|
||||
Reference in new issue
Block a user