Skip to content

Commit 67fd917

Browse files
committed
wip
1 parent fc28f32 commit 67fd917

1 file changed

Lines changed: 33 additions & 10 deletions

File tree

.github/workflows/package-min-bundle.yml

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ on:
44
push:
55
branches:
66
- wpb-27900
7-
workflow_dispatch: {}
8-
# inputs:
9-
# repository:
10-
# description: 'OCI repository (e.g., quay.io/wire/charts/dev/webapp)'
11-
# required: true
12-
# type: string
13-
# tag:
14-
# description: 'Chart version/tag'
15-
# required: true
16-
# type: string
7+
workflow_dispatch:
8+
inputs:
9+
release_stream:
10+
description: pull the latest bundle from this release stream
11+
type: string
12+
required: false
13+
default: dev-gov
14+
oci_link:
15+
description: pull this specific link instead of release_stream
16+
required: false
17+
type: string
1718

1819
jobs:
1920
update:
@@ -37,3 +38,25 @@ jobs:
3738
run: |
3839
echo "${{ secrets.QUAY_WIRE_CI_GOV_READONLY_PASSWORD }}" | oras login -u "${{ secrets.QUAY_WIRE_CI_GOV_READONLY_USERNAME }}" --password-stdin quay.io
3940
echo "${{ secrets.QUAY_WIRE_CI_GOV_READONLY_PASSWORD }}" | helm registry login -u "${{ secrets.QUAY_WIRE_CI_GOV_READONLY_USERNAME }}" --password-stdin quay.io
41+
42+
- name: Download online bundle
43+
env:
44+
RELEASE_STREAM: ${{ inputs.release_stream }}
45+
OCI_LINK: ${{ inputs.oci_link }}
46+
run: |
47+
echo "test"
48+
49+
# TODO: only if RELEASE_STREAM is configured
50+
51+
TEMP_DIR=$(mktemp -d)
52+
trap "rm -rf $TEMP_DIR" EXIT
53+
oras pull "quay.io/wire/release-streams/bundles:$RELEASE_STREAM" -o "$TEMP_DIR"
54+
55+
BUILD_JSON=$(cat "$TEMP_DIR/build.json")
56+
REPOSITORY=$(echo "$BUILD_JSON" | jq -r '.repository')
57+
TAG=$(echo "$BUILD_JSON" | jq -r '.tag')
58+
59+
echo "$REPOSITORY:$TAG"
60+
oras pull "$REPOSITORY:$TAG" -o "$TEMP_DIR"
61+
62+
ls "$TEMP_DIR"

0 commit comments

Comments
 (0)