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
|
||||
emulation: true
|
||||
|
||||
permissions:
|
||||
# Organization GHCR
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@ -152,6 +148,10 @@ jobs:
|
||||
- build
|
||||
- test
|
||||
|
||||
permissions:
|
||||
# Organization GHCR
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
@ -255,8 +255,7 @@ container.push() {
|
||||
done
|
||||
|
||||
# Manifest tags
|
||||
release_tags=("latest")
|
||||
release_tags+=("$DOCKER_TAG")
|
||||
release_tags=("latest" "$DOCKER_TAG")
|
||||
|
||||
# Create manifests
|
||||
for tag in "${release_tags[@]}"; do
|
||||
@ -274,13 +273,18 @@ container.push() {
|
||||
|
||||
podman image list
|
||||
|
||||
# Push manifests
|
||||
for tag in "${release_tags[@]}"; do
|
||||
build_msg CONTAINER "Pushing manifest with tag: $tag"
|
||||
# Remote registries
|
||||
release_registries=("ghcr.io" "docker.io")
|
||||
|
||||
podman manifest push \
|
||||
"localhost/$CONTAINER_IMAGE_ORGANIZATION/$CONTAINER_IMAGE_NAME:$tag" \
|
||||
"docker://docker.io/$CONTAINER_IMAGE_ORGANIZATION/$CONTAINER_IMAGE_NAME:$tag"
|
||||
# Push manifests
|
||||
for registry in "${release_registries[@]}"; do
|
||||
for tag in "${release_tags[@]}"; do
|
||||
build_msg CONTAINER "Pushing manifest $tag to $registry"
|
||||
|
||||
podman manifest push \
|
||||
"localhost/$CONTAINER_IMAGE_ORGANIZATION/$CONTAINER_IMAGE_NAME:$tag" \
|
||||
"docker://$registry/$CONTAINER_IMAGE_ORGANIZATION/$CONTAINER_IMAGE_NAME:$tag"
|
||||
done
|
||||
done
|
||||
)
|
||||
dump_return $?
|
||||
|
Loading…
x
Reference in New Issue
Block a user