mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-08 00:30:22 +08:00
19 lines
911 B
YAML
19 lines
911 B
YAML
when:
|
|
- event: push
|
|
|
|
skip_clone: true
|
|
|
|
steps:
|
|
- name: tag
|
|
image: alpine/curl
|
|
environment:
|
|
ACCESS_TOKEN:
|
|
from_secret: ACCESS_TOKEN
|
|
commands:
|
|
- >-
|
|
curl -s -o /dev/null -X "DELETE" "https://codeberg.org/api/v1/repos/$CI_REPO/releases/tags/auto.latest" -H "accept: application/json" -H "Authorization: token $ACCESS_TOKEN"
|
|
- >-
|
|
curl -s -o /dev/null -X "DELETE" "https://codeberg.org/api/v1/repos/$CI_REPO/tags/auto.latest" -H "accept: application/json" -H "Authorization: token $ACCESS_TOKEN"
|
|
- >-
|
|
if [ $(curl -s -o /dev/null -w "%{http_code}" -X "POST" "https://codeberg.org/api/v1/repos/$CI_REPO/tags" -H "accept: application/json" -H "Authorization: token $ACCESS_TOKEN" -H "Content-Type: application/json" -d "{\"message\": \"AUTO TRIGGER TAG\", \"tag_name\": \"auto.latest\", \"target\": \"$CI_COMMIT_SHA\"}") != "201" ]; then exit 1; fi
|