Update .woodpecker.yml

This commit is contained in:
mike 2024-09-08 21:00:56 +02:00
parent 4d8c6e06e6
commit 62c9bcab97

View file

@ -1,29 +1,18 @@
steps: steps:
- name: build - name: Build and Publish Docker Image
when: when:
- branch: main - branch: main
event: push event: push
- event: tag - event: tag
image: docker image: woodpeckerci/plugin-docker-buildx
commands: settings:
- docker build -t $CI_REG_HOST:$CI_REG_PORT/$CI_REPO_OWNER/$CI_REPO_NAME:latest . platforms: linux/amd64
volumes: repo: ${CI_REG_HOST}:${CI_REG_PORT}/${CI_REPO_OWNER}/${CI_REPO_NAME}
- /var/run/docker.sock:/var/run/docker.sock tags: latest
registry: http://${CI_REG_HOST}:${CI_REG_PORT}
- name: push insecure: true
when: buildkit_config: "[registry.\"${CI_REG_HOST}:${CI_REG_PORT}\"]\n http = true\n insecure = true"
- branch: main username:
event: push
- event: tag
depends_on: build
image: docker
environment:
REG_USER:
from_secret: CI_REG_USER from_secret: CI_REG_USER
REG_TOKEN: password:
from_secret: CI_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