diff --git a/.github/workflows/opendronemap-image.yml b/.github/workflows/opendronemap-image.yml new file mode 100644 index 0000000..0ee7923 --- /dev/null +++ b/.github/workflows/opendronemap-image.yml @@ -0,0 +1,49 @@ +name: Publish measured OpenDroneMap image +on: + push: + branches: [AKO-28] + paths: [.github/workflows/opendronemap-image.yml] + workflow_dispatch: +permissions: + contents: read + packages: write +jobs: + publish: + runs-on: ubuntu-latest + timeout-minutes: 45 + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + IMAGE: ghcr.io/uffescience/akoflow-examples/opendronemap + TAG: caliterra-ce38c348fa95a1f0 + ORIGINAL: sha256:ce38c348fa95a1f0549546cb8cccd7eb64819a6a9fe9bad78640aff90f8ab76f + steps: + - name: Download checksummed executed archive + run: | + gh release download opendronemap-caliterra-v1 -p opendronemap-executed-image.tar.gz -D "$RUNNER_TEMP" + cd "$RUNNER_TEMP" + echo '93435411deae918ed885e7e345b96d429a4f8d998ceebfeb5cf91b53bbd4f9ab opendronemap-executed-image.tar.gz' | sha256sum -c - + gzip -dc opendronemap-executed-image.tar.gz > image.tar + - name: Install registry copy tool + run: sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends skopeo + - name: Preserve measured image and publish registry origin + run: | + set -euo pipefail + export REGISTRY_AUTH_FILE="$RUNNER_TEMP/registry-auth.json" + printf '%s' "$GH_TOKEN" | skopeo login --username "$GITHUB_ACTOR" --password-stdin ghcr.io + SRC="oci-archive:$RUNNER_TEMP/image.tar" + if ! skopeo inspect --raw "$SRC" > "$RUNNER_TEMP/original-manifest.json"; then + SRC="docker-archive:$RUNNER_TEMP/image.tar" + skopeo inspect --raw "$SRC" > "$RUNNER_TEMP/original-manifest.json" + fi + MANIFEST="sha256:$(sha256sum "$RUNNER_TEMP/original-manifest.json" | cut -d' ' -f1)" + CONFIG=$(jq -r '.config.digest' "$RUNNER_TEMP/original-manifest.json") + test "$ORIGINAL" = "$MANIFEST" || test "$ORIGINAL" = "$CONFIG" + skopeo copy --all --preserve-digests "$SRC" "docker://$IMAGE:$TAG" + skopeo inspect --raw "docker://$IMAGE:$TAG" > "$RUNNER_TEMP/published-manifest.json" + cmp "$RUNNER_TEMP/original-manifest.json" "$RUNNER_TEMP/published-manifest.json" + jq -n --arg image "$IMAGE@$MANIFEST" --arg configDigest "$CONFIG" --arg platform linux/amd64 --arg original "$ORIGINAL" '{image:$image,platform:$platform,configDigest:$configDigest,originalEvidenceDigest:$original,rebuilt:false}' > "$RUNNER_TEMP/registry-receipt.json" + - uses: actions/upload-artifact@v4 + with: + name: opendronemap-registry-receipt + path: ${{ runner.temp }}/registry-receipt.json diff --git a/scientific-workflows/opendronemap/README.md b/scientific-workflows/opendronemap/README.md index a2ca145..df876da 100644 --- a/scientific-workflows/opendronemap/README.md +++ b/scientific-workflows/opendronemap/README.md @@ -26,7 +26,9 @@ To use the exact runtime captured by the Hub workflow, download the image archiv docker load -i opendronemap-executed-image.tar.gz ``` -The archive restores `akoflow-local/opendronemap:local-ce38c348fa95a1f0`, including all original photograph inputs and the scientific programs used in the native run. No public OCI registry tag is implied. The source bundle also supports building and running the local workflow below. The GIF renderer is additional publication postprocessing, separate from the nine-activity captured workflow. +The archive restores `akoflow-local/opendronemap:local-ce38c348fa95a1f0`, including all original photograph inputs and the scientific programs used in the native run. The unchanged measured image is also available publicly at `ghcr.io/uffescience/akoflow-examples/opendronemap@sha256:ce38c348fa95a1f0549546cb8cccd7eb64819a6a9fe9bad78640aff90f8ab76f` for `linux/amd64`. Anonymous pulling was verified, and the original manifest was preserved without rebuilding the image. + +Hub version 2 supplies this immutable registry origin to all nine activities. Import `akoflow::o/akoflow/scientific-workflows-opendronemap:latest` to create the workflow on another installation; an already loaded version 1 draft must be reloaded from version 2 or latest. The 77 source photographs are already included in the image, so no separate user upload is needed. This portability update does not claim a new scientific execution. The source bundle also supports building and running the local workflow below. The GIF renderer is additional publication postprocessing, separate from the nine-activity captured workflow. Process 77 original GPS-tagged aerial photographs of Caliterra, Dripping Springs, Texas into a georeferenced orthomosaic, a surface-elevation raster and a colored point cloud. AkôFlow schedules two reconstruction activities in parallel, aligns their results, schedules two native ODM processing activities in parallel, and merges their products using the original ODM merge implementation. diff --git a/scientific-workflows/opendronemap/evidence/public-image-alias.json b/scientific-workflows/opendronemap/evidence/public-image-alias.json new file mode 100644 index 0000000..be3a1e6 --- /dev/null +++ b/scientific-workflows/opendronemap/evidence/public-image-alias.json @@ -0,0 +1,11 @@ +{ + "originalImage": "akoflow-local/opendronemap:local-ce38c348fa95a1f0", + "imageId": "sha256:ce38c348fa95a1f0549546cb8cccd7eb64819a6a9fe9bad78640aff90f8ab76f", + "publicImage": "ghcr.io/uffescience/akoflow-examples/opendronemap@sha256:ce38c348fa95a1f0549546cb8cccd7eb64819a6a9fe9bad78640aff90f8ab76f", + "identical": true, + "rebuilt": false, + "platform": "linux/amd64", + "anonymousPullVerified": true, + "archiveSha256": "93435411deae918ed885e7e345b96d429a4f8d998ceebfeb5cf91b53bbd4f9ab", + "publisherRun": "https://github.com/UFFeScience/akoflow-examples/actions/runs/44212043297" +}