Skip to content

Generate Images Digests #24

Generate Images Digests

Generate Images Digests #24

name: Generate Images Digests
on:
workflow_dispatch:
inputs:
tag:
type: string
description: "e.g: v2.8.4"
required: true
base_registry:
type: choice
description: "registry where the images were first uploaded to"
options:
- "docker.io"
- "stgregistry.suse.com"
- "registry.rancher.com"
required: true
rancher_repo_owner:
type: string
description: "org that the rancher repo is located in"
default: "rancher"
required: false
prime_only:
type: boolean
description: "release is prime only"
default: false
required: true
jobs:
digests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: setup ecm-distro-tools
uses: tashima42/ecm-distro-tools@linux-digests
with:
version: v0.0.7
- name: Create ecm config file
run: |
mkdir -p ~/.ecm-distro-tools
release config gen
- name: Generate Digests
run: |
export IMAGES_URL=https://github.com/${{ github.event.inputs.rancher_repo_owner }}/rancher/releases/download/${{ github.event.inputs.tag }}/rancher-images.txt
if [[ ${{ github.event.inputs.prime_only }} = true ]]; then
export IMAGES_URL=https://prime.ribs.rancher.io/rancher/${{ github.event.inputs.tag }}/rancher-images.txt
fi
mkdir -p /tmp/dist
release generate rancher docker-images-digests \
--images-url "$IMAGES_URL" \
--output-file /tmp/dist/rancher-images-digests-linux-amd64.txt \
--registry "${{ github.event.inputs.base_registry }}"
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: "digests"
path: /tmp/dist
if-no-files-found: error
retention-days: 1
overwrite: false