This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Package min bundle | |
| on: | |
| push: | |
| branches: | |
| - wpb-27900 | |
| workflow_dispatch: | |
| inputs: | |
| release_stream: | |
| description: pull the latest bundle from this release stream | |
| type: string | |
| required: false | |
| default: dev-gov | |
| oci_link: | |
| description: pull this specific link instead of release_stream | |
| required: false | |
| type: string | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up ORAS | |
| uses: oras-project/setup-oras@v1 | |
| - name: Set up Helm | |
| uses: azure/setup-helm@v3 | |
| with: | |
| version: '3.14.0' | |
| - name: Login to Quay | |
| run: | | |
| echo "${{ secrets.QUAY_WIRE_CI_GOV_READONLY_PASSWORD }}" | oras login -u "${{ secrets.QUAY_WIRE_CI_GOV_READONLY_USERNAME }}" --password-stdin quay.io | |
| echo "${{ secrets.QUAY_WIRE_CI_GOV_READONLY_PASSWORD }}" | helm registry login -u "${{ secrets.QUAY_WIRE_CI_GOV_READONLY_USERNAME }}" --password-stdin quay.io | |
| - name: Download online bundle | |
| env: | |
| RELEASE_STREAM: ${{ inputs.release_stream }} | |
| OCI_LINK: ${{ inputs.oci_link }} | |
| run: | | |
| echo "test" | |
| # TODO: only if RELEASE_STREAM is configured | |
| TEMP_DIR=$(mktemp -d) | |
| trap "rm -rf $TEMP_DIR" EXIT | |
| oras pull "quay.io/wire/release-streams/bundles:$RELEASE_STREAM" -o "$TEMP_DIR" | |
| BUILD_JSON=$(cat "$TEMP_DIR/build.json") | |
| REPOSITORY=$(echo "$BUILD_JSON" | jq -r '.repository') | |
| TAG=$(echo "$BUILD_JSON" | jq -r '.tag') | |
| echo "$REPOSITORY:$TAG" | |
| oras pull "$REPOSITORY:$TAG" -o "$TEMP_DIR" | |
| ls "$TEMP_DIR" |