mirror of
https://github.com/kasmtech/kasm-install-wizard.git
synced 2026-07-17 16:35:08 +00:00
38 lines
1 KiB
YAML
38 lines
1 KiB
YAML
image: alpine
|
|
|
|
variables:
|
|
DOCKER_HOST: tcp://docker:2375
|
|
DOCKER_TLS_CERTDIR: ""
|
|
DOCKER_AUTH_CONFIG: ${_DOCKER_AUTH_CONFIG}
|
|
|
|
default:
|
|
tags:
|
|
- oci-fixed-amd
|
|
|
|
stages:
|
|
- update
|
|
|
|
update_list_json:
|
|
stage: update
|
|
rules:
|
|
- if: '$CI_COMMIT_REF_NAME =~ /^release\//'
|
|
when: on_success
|
|
script:
|
|
- apk add curl git
|
|
- |
|
|
if curl -fsSL https://registry.kasmweb.com/1.1/list.json -o list.json.tmp; then
|
|
mv list.json.tmp list.json
|
|
git config user.email "ci@gitlab"
|
|
git config user.name "GitLab CI"
|
|
git remote set-url origin "https://gitlab-ci-token:${CI_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
|
|
git add list.json
|
|
if ! git diff --cached --quiet; then
|
|
git commit -m "chore: update list.json from registry [skip ci]"
|
|
git push origin HEAD:${CI_COMMIT_REF_NAME}
|
|
else
|
|
echo "list.json unchanged, nothing to commit"
|
|
fi
|
|
else
|
|
echo "Failed to fetch list.json, skipping update"
|
|
rm -f list.json.tmp
|
|
fi
|