From 269c00b240a38269c9dff8dfc0c5aafe9415b055 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sun, 27 Oct 2024 14:26:00 -0700 Subject: [PATCH] Yet another attempt at making a docs tarball from a container image. --- .gitea/workflows/build.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index cdee490c..16a687d9 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -27,6 +27,10 @@ jobs: - run: podman build --tag "$IMAGE_NAME" --file docs/Dockerfile --storage-opt "overlay.mount_program=/usr/bin/fuse-overlayfs" . - run: podman push "$IMAGE_NAME" - run: mkdir borgmatic-docs - - run: podman export "$IMAGE_NAME" | tar xf - --strip-components 4 --directory borgmatic-docs usr/share/nginx/html + - run: docs_container_id=$(podman create borgmatic-docs) + - run: podman cp $docs_container_id:/usr/share/nginx/html - > borgmatic-docs-dump.tar + - run: tar xf borgmatic-docs-dump.tar + - run: mv html borgmatic-docs - run: tar cfz borgmatic-docs.tar.gz borgmatic-docs + - run: podman rm --volumes $docs_container_id - run: curl --user "${{ secrets.REGISTRY_USERNAME }}:${{ secrets.REGISTRY_PASSWORD }}" --upload-file borgmatic-docs.tar.gz https://projects.torsion.org/api/packages/borgmatic-collective/generic/borgmatic-docs/$(head --lines=1 NEWS)/borgmatic-docs.tar.gz