Collect Images #9
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: Collect Images | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| appscode_cloud_tag: | |
| description: 'appscode-cloud/installer tag (names the output dir; component tags are derived from it)' | |
| required: true | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.inputs.appscode_cloud_tag }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| collect: | |
| name: Collect | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| go-version: 'stable' | |
| cache: false | |
| - name: Prepare host | |
| run: | | |
| # install yq (v3 shim used by the installer repos) | |
| curl -fsSL -o yqq https://github.com/mikefarah/yq/releases/download/3.3.0/yq_linux_amd64 | |
| chmod +x yqq | |
| sudo mv yqq /usr/local/bin/yqq | |
| pipx install yq | |
| # install x-helm build of helm 3 | |
| pushd /usr/local/bin && sudo curl -fsSLO https://github.com/x-helm/helm/releases/latest/download/helm && sudo chmod +x helm && popd | |
| - name: Collect image lists from installer orgs | |
| env: | |
| APPSCODE_CLOUD_TAG: ${{ github.event.inputs.appscode_cloud_tag }} | |
| run: go run . from-orgs | |
| - name: Collect image lists from external charts | |
| env: | |
| APPSCODE_CLOUD_TAG: ${{ github.event.inputs.appscode_cloud_tag }} | |
| run: go run . externals | |
| - name: Collect kluster-manager images embedded in CR specs | |
| env: | |
| APPSCODE_CLOUD_TAG: ${{ github.event.inputs.appscode_cloud_tag }} | |
| run: go run . kluster-manager | |
| - name: Aggregate grouped lists and README | |
| env: | |
| TAG: ${{ github.event.inputs.appscode_cloud_tag }} | |
| run: | | |
| bash bare-scripts/aggregate-lists.sh "${TAG}" | |
| cp bare-scripts/notes.md "${TAG}/README.md" | |
| - name: Push image lists to tag branch | |
| env: | |
| TAG: ${{ github.event.inputs.appscode_cloud_tag }} | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git switch --orphan "${TAG}" | |
| # from-orgs names the output dir after the tag; the branch is | |
| # already the tag, so flatten it to the branch root before committing. | |
| mv "${TAG}"/* . | |
| rmdir "${TAG}" | |
| git add -A | |
| git commit -s -m "Collect images for ${TAG}" | |
| git push --force origin "${TAG}" |