美文网首页容器技术
七十、Git和容器CI/CD-GitHub Actions实现b

七十、Git和容器CI/CD-GitHub Actions实现b

作者: InsaneLoafer | 来源:发表于2022-01-22 15:47 被阅读0次

    搜索buildx的例子

    Docker Setup Buildx · Actions · GitHub Marketplace

    改进docker-build.yml文件

    name: Docker image buildx and push
    on: [push]
    jobs:
      Docker-Build-Push:
        runs-on: ubuntu-latest
        steps:
          -
            name: Checkout
            uses: actions/checkout@v2
          -
            name: Set up QEMU
            uses: docker/setup-qemu-action@v1
          -
            name: Set up Docker Buildx
            id: buildx
            uses: docker/setup-buildx-action@v1
          -
            name: Login to DockerHub
            uses: docker/login-action@v1 
            with:
              username: ${{ secrets.DOCKERHUB_USERNAME }}
              password: ${{ secrets.DOCKERHUB_PASSWORD }}
          -
            name: Build and push
            id: docker_build
            uses: docker/build-push-action@v2
            with:
              push: true
              platforms: linux/amd64,linux/arm64
              tags: insaneloafer/flask-redis:latest
    

    查看结果


    相关文章

      网友评论

        本文标题:七十、Git和容器CI/CD-GitHub Actions实现b

        本文链接:https://www.haomeiwen.com/subject/laukcrtx.html