From 62c9bcab97af50e1f8671619d70f36b8d173c063 Mon Sep 17 00:00:00 2001 From: mike Date: Sun, 8 Sep 2024 21:00:56 +0200 Subject: [PATCH] Update .woodpecker.yml --- .woodpecker.yml | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) 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