##改后: icons反而不行 #41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ref docker-registry; _ee\build-nginx\.github\workflows\docker-build.yaml | |
| name: "Build and push Docker image" | |
| on: | |
| push: | |
| branches: ["*"] | |
| tags: ["*"] | |
| # schedule: | |
| # - cron: "0 0 * * 0" | |
| jobs: | |
| main: | |
| #! runs-on: "ubuntu-20.04" | |
| runs-on: "ubuntu-22.04" | |
| steps: | |
| - name: "Checkout" | |
| uses: "actions/checkout@v2" | |
| - name: Setup QEMU | |
| # uses: docker/setup-qemu-action@v1 | |
| uses: docker/setup-qemu-action@v2 #ref docker-baseimage-gui | |
| with: | |
| platforms: arm,arm64,ppc64le,mips64,s390x | |
| - name: Setup Docker Buildx | |
| # uses: docker/setup-buildx-action@ | |
| uses: docker/setup-buildx-action@v2 | |
| with: | |
| driver-opts: network=host | |
| - name: Call buildx.sh(build with ali's cache, push) | |
| run: | | |
| # VARS | |
| echo ${{ github.repository_owner }} #infrastlabs | |
| echo ${{ github.repository }} | |
| echo ${{ secrets.DOCKER_REGISTRY_PW_DOCKERHUB }} #fill not show in log | |
| # INFO | |
| pwd && ls -l | |
| docker version | |
| free -h; df -h; ip a |grep inet; uname -a; | |
| docker image prune -a -f; df -h | |
| # ENV | |
| # registry-1.docker.io| noneView | |
| export DOCKER_REGISTRY_USER_dockerhub=${{ secrets.DOCKER_REGISTRY_USER_DOCKERHUB }} | |
| export DOCKER_REGISTRY_PW_dockerhub=${{ secrets.DOCKER_REGISTRY_PW_DOCKERHUB }} | |
| # ali's| size, none-arch, layers; | |
| export DOCKER_REGISTRY_USER_infrastSubUser2=${{ secrets.DOCKER_REGISTRY_USER_INFRASTSUBUSER2 }} | |
| export DOCKER_REGISTRY_PW_infrastSubUser2=${{ secrets.DOCKER_REGISTRY_PW_INFRASTSUBUSER2 }} | |
| # tencloud| type:Docker-Manifest-List; none: size, arch, layers; x10:x500; slowPushBack; | |
| export DOCKER_REGISTRY_TENCLOUD_USER=${{ secrets.DOCKER_REGISTRY_TENCLOUD_USER }} | |
| export DOCKER_REGISTRY_TENCLOUD_PASS=${{ secrets.DOCKER_REGISTRY_TENCLOUD_PASS }} | |
| # qingcloud| tag, size-only; none-arch,layer; | |
| export DOCKER_REGISTRY_QCLOUD_USER=${{ secrets.DOCKER_REGISTRY_QCLOUD_USER }} | |
| export DOCKER_REGISTRY_QCLOUD_PASS=${{ secrets.DOCKER_REGISTRY_QCLOUD_PASS }} | |
| export REPO_HUB=registry-1.docker.io | |
| export REPO_ALI=registry.cn-shenzhen.aliyuncs.com | |
| export REPO_TEN=ccr.ccs.tencentyun.com | |
| export REPO_TEN_HK=hkccr.ccs.tencentyun.com | |
| export REPO_QING=dockerhub.qingcloud.com | |
| export REPO=$REPO_ALI #REPO_HUB REPO_ALI ##without "xx/" | |
| # JUST LOGIN HERE | |
| # echo "${DOCKER_REGISTRY_TENCLOUD_PASS}" |docker login --username=${DOCKER_REGISTRY_TENCLOUD_USER} --password-stdin $REPO_TEN | |
| echo "${DOCKER_REGISTRY_TENCLOUD_PASS}" |docker login --username=${DOCKER_REGISTRY_TENCLOUD_USER} --password-stdin $REPO_TEN_HK | |
| # echo "${DOCKER_REGISTRY_QCLOUD_PASS}" |docker login --username=${DOCKER_REGISTRY_QCLOUD_USER} --password-stdin $REPO_QING | |
| echo doBuild; doBuild=true | |
| test "true" == "$doBuild" && bash build/buildx.sh #nginx |