mirror of
https://github.com/searxng/searxng.git
synced 2025-05-24 01:12:56 -04:00
[enh] container: support multiple registries
Allows to push the manifests to other registries, this allows to push both docker.io and ghcr.io registries.
This commit is contained in:
parent
743f24d8c6
commit
cd64fb966e
8
.github/workflows/container.yml
vendored
8
.github/workflows/container.yml
vendored
@ -117,10 +117,6 @@ jobs:
|
|||||||
os: ubuntu-24.04-arm
|
os: ubuntu-24.04-arm
|
||||||
emulation: true
|
emulation: true
|
||||||
|
|
||||||
permissions:
|
|
||||||
# Organization GHCR
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -152,6 +148,10 @@ jobs:
|
|||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
# Organization GHCR
|
||||||
|
packages: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -255,8 +255,7 @@ container.push() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Manifest tags
|
# Manifest tags
|
||||||
release_tags=("latest")
|
release_tags=("latest" "$DOCKER_TAG")
|
||||||
release_tags+=("$DOCKER_TAG")
|
|
||||||
|
|
||||||
# Create manifests
|
# Create manifests
|
||||||
for tag in "${release_tags[@]}"; do
|
for tag in "${release_tags[@]}"; do
|
||||||
@ -274,13 +273,18 @@ container.push() {
|
|||||||
|
|
||||||
podman image list
|
podman image list
|
||||||
|
|
||||||
|
# Remote registries
|
||||||
|
release_registries=("ghcr.io" "docker.io")
|
||||||
|
|
||||||
# Push manifests
|
# Push manifests
|
||||||
|
for registry in "${release_registries[@]}"; do
|
||||||
for tag in "${release_tags[@]}"; do
|
for tag in "${release_tags[@]}"; do
|
||||||
build_msg CONTAINER "Pushing manifest with tag: $tag"
|
build_msg CONTAINER "Pushing manifest $tag to $registry"
|
||||||
|
|
||||||
podman manifest push \
|
podman manifest push \
|
||||||
"localhost/$CONTAINER_IMAGE_ORGANIZATION/$CONTAINER_IMAGE_NAME:$tag" \
|
"localhost/$CONTAINER_IMAGE_ORGANIZATION/$CONTAINER_IMAGE_NAME:$tag" \
|
||||||
"docker://docker.io/$CONTAINER_IMAGE_ORGANIZATION/$CONTAINER_IMAGE_NAME:$tag"
|
"docker://$registry/$CONTAINER_IMAGE_ORGANIZATION/$CONTAINER_IMAGE_NAME:$tag"
|
||||||
|
done
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
dump_return $?
|
dump_return $?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user