File tree Expand file tree Collapse file tree 3 files changed +35
-19
lines changed
Expand file tree Collapse file tree 3 files changed +35
-19
lines changed Original file line number Diff line number Diff line change 33 - runner :
44 cpus : 8
55 services :
6- - docker
76 - git-clone-yyds
7+ - name : docker
8+ options :
9+ rootlessBuildkitd :
10+ enabled : true
811 imports :
912 - https://cnb.cool/eryajf/build-env/-/blob/main/env.yaml
1013 env :
2326 timeout : 3h
2427 script : |
2528 echo ${ALIHUB_TOKEN} | docker login -u ${ALIHUB_USERNAME} --password-stdin ${ALIHUB_URL}
26- docker run -d --name buildkitd \
27- --security-opt seccomp=unconfined \
28- --security-opt apparmor=unconfined \
29- --security-opt systempaths=unconfined \
30- moby/buildkit:rootless
31- docker buildx create --use \
32- --name mybuilder \
33- --driver remote docker-container://buildkitd
3429 docker buildx build \
3530 -t ${ALIHUB_URL}/${ALIHUB_USERNAME}/${IMAGE_NAME} \
3631 -t ${ALIHUB_URL}/${ALIHUB_USERNAME}/${IMAGE_NAME}:${CNB_BRANCH}_`date "+%Y%m%d%H%M%S"` \
Original file line number Diff line number Diff line change 33 - runner :
44 cpus : 8
55 services :
6- - docker
76 - git-clone-yyds
7+ - name : docker
8+ options :
9+ rootlessBuildkitd :
10+ enabled : true
811 env :
912 IMAGE_NAME : " go-ldap-admin"
1013 DOCKERHUB_USERNAME : eryajf
2932 - name : 🐋 推送镜像
3033 timeout : 3h
3134 script : |
32- docker login -u ${ALIHUB_USERNAME} -p ${ALIHUB_TOKEN} ${ALIHUB_URL}
33- docker run -d --name buildkitd \
34- --security-opt seccomp=unconfined \
35- --security-opt apparmor=unconfined \
36- --security-opt systempaths=unconfined \
37- moby/buildkit:rootless
38- docker buildx create --use \
39- --name mybuilder \
40- --driver remote docker-container://buildkitd
35+ echo ${ALIHUB_TOKEN} | docker login -u ${ALIHUB_USERNAME} --password-stdin ${ALIHUB_URL}
4136 docker buildx build \
4237 -t ${ALIHUB_URL}/${ALIHUB_USERNAME}/${IMAGE_NAME} \
4338 -t ${ALIHUB_URL}/${ALIHUB_USERNAME}/${IMAGE_NAME}:${CNB_BRANCH} \
Original file line number Diff line number Diff line change 1+ name : Sync to CNB
2+
3+ on : [push]
4+
5+ jobs :
6+ sync :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@v4
10+ with :
11+ fetch-depth : 0
12+
13+ - name : Sync to CNB Repository
14+ run : |
15+ docker run --rm \
16+ -v ${{ github.workspace }}:${{ github.workspace }} \
17+ -w ${{ github.workspace }} \
18+ -e PLUGIN_TARGET_URL="https://cnb.cool/opsre/go-ldap-admin.git" \
19+ -e PLUGIN_AUTH_TYPE="https" \
20+ -e PLUGIN_USERNAME="cnb" \
21+ -e PLUGIN_PASSWORD=${{ secrets.CNB_TOKEN }} \
22+ -e PLUGIN_BRANCH="main" \
23+ -e PLUGIN_GIT_USER="cnb" \
24+ -e PLUGIN_GIT_EMAIL="cnb@cnb.cool" \
25+ -e PLUGIN_FORCE="true" \
26+ tencentcom/git-sync
You can’t perform that action at this time.
0 commit comments