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:
- 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:
password:
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