Skip to content

Commit

Permalink
merge digests action
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreat committed Nov 13, 2024
1 parent f6cfc1d commit 2a2df01
Showing 1 changed file with 47 additions and 34 deletions.
81 changes: 47 additions & 34 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,41 +65,54 @@ jobs:
docker-rust-base-merge:
runs-on: mco-dev-small-x64
needs:
- docker-rust-base
- docker-rust-base
steps:
- name: Download digests
uses: actions/download-artifact@v4
with:
path: /tmp/digests
pattern: digests-rust-base*
merge-multiple: true

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: mobilecoin/rust-base
tags: |
type=semver,pattern=v{{version}}
type=sha
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Create manifest list and push
shell: bash
working-directory: /tmp/digests
run: |
ls -al
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf 'mobilecoin/rust-base@sha256:%s ' *)
- name: Merge and Tag Digests
uses: mobilecoinofficial/gh-actions/docker-merge-digests@8ed6075d8f78f3c63f6836526448c36a20c137d0
with:
digest_artifact_prefix: digests-rust-base
images: mobilecoin/rust-base
flavor: latest=true
tags: |
type=semver,pattern=v{{version}}
type=sha
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# - name: Download digests
# uses: actions/download-artifact@v4
# with:
# path: /tmp/digests
# pattern: digests-rust-base*
# merge-multiple: true

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3

# - name: Docker meta
# id: meta
# uses: docker/metadata-action@v5
# with:
# images: mobilecoin/rust-base
# tags: |
# type=semver,pattern=v{{version}}
# type=sha

# - name: Login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}

# - name: Create manifest list and push
# shell: bash
# working-directory: /tmp/digests
# run: |
# # Grab the tags from metadata-action ENV with jq
# # Gather all the digests for the images pushed (names of empty files stored as artifacts)
# # Push a manifest (tag) with all the digests to dockerhub
# docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
# $(printf 'mobilecoin/rust-base@sha256:%s ' *)


# docker-rust-sgx:
Expand Down

0 comments on commit 2a2df01

Please sign in to comment.