enable ghcr.io & disable docker.io
This commit is contained in:
parent
e659285cf5
commit
2d4308001c
24
.gitea/workflows/Push_ghcr.yaml
Normal file
24
.gitea/workflows/Push_ghcr.yaml
Normal file
@ -0,0 +1,24 @@
|
||||
name: Push_ghcr
|
||||
|
||||
on:
|
||||
push:
|
||||
# Sequence of patterns matched against refs/heads
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
Push:
|
||||
runs-on: runner
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: retag images
|
||||
run: bash retag.sh
|
||||
- name: login ghcr_registry
|
||||
uses: https://eoelab.org:1027/actions/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ secrets.USERNAME }}
|
||||
password: ${{ secrets.GHCR_PASSWD }}
|
||||
- name: push images to ghcr_registry
|
||||
run: docker image push "ghcr.io/${{ gitea.repository }}" --all-tags
|
@ -6,9 +6,9 @@ English | [中文](README_CN.md)
|
||||
|
||||
**THIS doc for non-CN USER**
|
||||
|
||||
**dockerhub: https://hub.docker.com/r/ben0i0d/jupyter**
|
||||
**ghcr.io: https://github.com/eoeair/jupyter/pkgs/container/jupyter**
|
||||
|
||||
**Our Gitea: https://eoelab.org:1027/ben0i0d/jupyter**
|
||||
**Our Gitea: https://eoelab.org:1027/eoeair/jupyter**
|
||||
|
||||
### HOW TO USE
|
||||
**Docker**
|
||||
|
@ -6,9 +6,9 @@ English | [中文](README_CN.md)
|
||||
|
||||
**为中国用户的文档**
|
||||
|
||||
**我们的docker镜像仓库是 https://hub.docker.com/r/ben0i0d/jupyter**
|
||||
**ghcr.io: https://github.com/eoeair/jupyter/pkgs/container/jupyter**
|
||||
|
||||
**我们的Gitea镜像仓库是 https://eoelab.org:1027/ben0i0d/jupyter**
|
||||
**Our Gitea: https://eoelab.org:1027/eoeair/jupyter**
|
||||
|
||||
### 如何使用
|
||||
**Docker**
|
||||
|
10
retag.sh
Normal file
10
retag.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
# 定义旧镜像名称的前缀和新的命名规则
|
||||
OLD_PREFIX="eoelab.org:1027/eoeair"
|
||||
NEW_PREFIX="ghcr.io/eoeair"
|
||||
# 获取所有与旧前缀匹配的镜像,并进行重命名
|
||||
docker images --format "{{.Repository}}:{{.Tag}}" | grep "$OLD_PREFIX" | while read OLD_IMAGE; do
|
||||
NEW_IMAGE=${OLD_IMAGE/$OLD_PREFIX/$NEW_PREFIX}
|
||||
echo "Renaming $OLD_IMAGE to $NEW_IMAGE"
|
||||
docker tag "$OLD_IMAGE" "$NEW_IMAGE"
|
||||
done
|
Loading…
x
Reference in New Issue
Block a user