diff --git a/.woodpecker.yml b/.woodpecker.yml index ac82cef..7382194 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,29 +1,18 @@ steps: - - name: build + - name: Build and Publish Docker Image when: - branch: main event: push - event: tag - image: docker - commands: - - docker build -t $CI_REG_HOST:$CI_REG_PORT/$CI_REPO_OWNER/$CI_REPO_NAME:latest . - volumes: - - /var/run/docker.sock:/var/run/docker.sock - - - name: push - when: - - branch: main - event: push - - event: tag - depends_on: build - image: docker - environment: - REG_USER: + image: woodpeckerci/plugin-docker-buildx + settings: + platforms: linux/amd64 + repo: ${CI_REG_HOST}:${CI_REG_PORT}/${CI_REPO_OWNER}/${CI_REPO_NAME} + tags: latest + registry: http://${CI_REG_HOST}:${CI_REG_PORT} + insecure: true + buildkit_config: "[registry.\"${CI_REG_HOST}:${CI_REG_PORT}\"]\n http = true\n insecure = true" + username: from_secret: CI_REG_USER - REG_TOKEN: - from_secret: CI_REG_TOKEN - commands: - - docker login $CI_REG_HOST:$CI_REG_PORT --username $REG_USER --password $REG_TOKEN - - docker push $CI_REG_HOST:$CI_REG_PORT/$CI_REPO_OWNER/$CI_REPO_NAME:latest - volumes: - - /var/run/docker.sock:/var/run/docker.sock + password: + from_secret: CI_REG_TOKEN \ No newline at end of file