test
This commit is contained in:
22
.woodpecker/other.yaml
Normal file
22
.woodpecker/other.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
steps:
|
||||
- name: build-and-push-branch
|
||||
image: ko:latest
|
||||
environment:
|
||||
KO_DOCKER_REPO:
|
||||
from_secret: KO_DOCKER_REPO
|
||||
DOCKER_CONFIG:
|
||||
from_secret: DOCKER_CONFIG_JSON
|
||||
|
||||
commands:
|
||||
# 도커 로그인 설정
|
||||
# - mkdir -p /root/.docker
|
||||
# - echo "$DOCKER_CONFIG" > /root/.docker/config.json
|
||||
|
||||
# # 안전한 브랜치 이름 치환 (e.g. "/" → "-")
|
||||
# - SAFE_BRANCH=$(echo "$CI_COMMIT_BRANCH" | tr '/' '-')
|
||||
|
||||
# short SHA (7자리) 기반 태그 생성
|
||||
- TAG="${SAFE_BRANCH}-${CI_COMMIT_SHA:0:7}"
|
||||
|
||||
# 이미지 빌드 및 push
|
||||
- ko build ./cmd/app --bare --tags "$TAG"
|
||||
Reference in New Issue
Block a user