Skip to content

Build

Build #1245

Workflow file for this run

name: Build
on:
workflow_dispatch:
inputs:
platforms:
description: ""
required: true
default: "linux/amd64,linux/arm64"
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to ACR
uses: docker/login-action@v3
with:
registry: https://registry.cn-hangzhou.aliyuncs.com
username: "${{ secrets.ACR_USERNAME }}"
password: "${{ secrets.ACR_PASSWORD }}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Controller
uses: docker/build-push-action@v6
with:
platforms: ${{ inputs.platforms }}
push: true
tags: docker.io/shaowenchen/ops-controller-manager:latest
file: Dockerfile
- name: Push ops-controller-manager to aliyun
run: |
export image=ops-controller-manager:latest
docker run --rm -v ~/.docker/config.json:/auth.json quay.io/skopeo/stable copy docker://shaowenchen/${image} docker://registry.cn-hangzhou.aliyuncs.com/shaowenchen/${image} --dest-authfile /auth.json --insecure-policy --src-tls-verify=false --dest-tls-verify=false --retry-times 5 --all
- name: Build and push Server
uses: docker/build-push-action@v6
with:
platforms: ${{ inputs.platforms }}
push: true
tags: docker.io/shaowenchen/ops-server:latest
file: Dockerfile-Server
- name: Push ops-server to aliyun
run: |
export image=ops-server:latest
docker run --rm -v ~/.docker/config.json:/auth.json quay.io/skopeo/stable copy docker://shaowenchen/${image} docker://registry.cn-hangzhou.aliyuncs.com/shaowenchen/${image} --dest-authfile /auth.json --insecure-policy --src-tls-verify=false --dest-tls-verify=false --retry-times 5 --all
- name: Build and push Cli
uses: docker/build-push-action@v6
with:
platforms: ${{ inputs.platforms }}
push: true
tags: docker.io/shaowenchen/ops-cli:latest
file: Dockerfile-Cli
- name: Push ops-cli to aliyun
run: |
export image=ops-cli:latest
docker run --rm -v ~/.docker/config.json:/auth.json quay.io/skopeo/stable copy docker://shaowenchen/${image} docker://registry.cn-hangzhou.aliyuncs.com/shaowenchen/${image} --dest-authfile /auth.json --insecure-policy --src-tls-verify=false --dest-tls-verify=false --retry-times 5 --all