Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Mirror to GitLab

on:
push:
branches:
- main

jobs:
mirror:
runs-on: ubuntu-latest
steps:
- run: git clone https://github.com/${{ github.repository }} .
- run: git remote add gitlab https://gitlab.com/code0-tech/development/reticulum.git
- run: >-
git
-c credential.helper='!f() { sleep 1; echo "username=${{ secrets.GL_API_USER }}"; echo "password=${{ secrets.GL_API_TOKEN }}"; }; f'
push
-o ci.skip
gitlab HEAD:main
14 changes: 14 additions & 0 deletions support/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ function build_image() {
container/$image/renderDockerfile
fi

build_args+=" --label org.opencontainers.image.source=https://github.com/code0-tech/reticulum"
build_args+=" --label org.opencontainers.image.version=$reticulum_tag"

if [ -e "versions/$image" ]; then
build_args+=" --label org.opencontainers.image.revision=$(cat versions/$image)"
fi

docker buildx build \
-t "ghcr.io/code0-tech/reticulum/ci-builds/$image$reticulum_push_tag" \
-f "container/$image/Dockerfile" \
Expand All @@ -49,6 +56,13 @@ function create_manifest() {
reticulum_tag=$2

args=(-t "ghcr.io/code0-tech/reticulum/ci-builds/$image:$reticulum_tag")
args+=(--annotation "index:org.opencontainers.image.source=https://github.com/code0-tech/reticulum")
args+=(--annotation "index:org.opencontainers.image.version=$reticulum_tag")

if [ -e "versions/$image" ]; then
args+=(--annotation "index:org.opencontainers.image.revision=$(cat versions/$image)")
fi

for manifest in manifest-*.json; do
args+=("$(jq -r '."image.name"' $manifest)@$(jq -r '."containerimage.digest"' $manifest)")
done
Expand Down