Skip to content

Sync Sealos Cluster Images #193

Sync Sealos Cluster Images

Sync Sealos Cluster Images #193

name: Sync Sealos Cluster Images
on:
workflow_dispatch:
schedule:
- cron: '0 8 * * *'
jobs:
resolve-versions:
runs-on: ubuntu-24.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: "labring/sealos"
ref: main
fetch-depth: 0
- name: Resolve Modules
id: set-matrix
run: |
git fetch --tags --force
tags=$(git tag | grep '^v5')
echo "tags=$tags"
matrix="{\"include\":["
for tag in $tags; do
version=$(echo $tag)
matrix="$matrix{\"version\":\"$version\"},"
done
matrix="${matrix%,}]}"
echo "matrix=$matrix" >> $GITHUB_OUTPUT
#sealos,sealos-cloud,sealos-patch
start-sealos:
needs: [ resolve-versions ]
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.resolve-versions.outputs.matrix) }}
uses: ./.github/workflows/autobuild-apps.yml
permissions: read-all
secrets: inherit
with:
app: sealos
version: ${{ matrix.version }}
start-sealos-latest:
uses: ./.github/workflows/autobuild-apps.yml
permissions: read-all
secrets: inherit
with:
app: sealos
version: latest
start-sealos-patch:
needs: [ resolve-versions ]
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.resolve-versions.outputs.matrix) }}
uses: ./.github/workflows/autobuild-apps.yml
permissions: read-all
secrets: inherit
with:
app: sealos-patch
version: ${{ matrix.version }}
start-sealos-patch-latest:
uses: ./.github/workflows/autobuild-apps-tag.yml
permissions: read-all
secrets: inherit
with:
fromImage: 'ghcr.io/labring/sealos-patch:latest'
start-sealos-cloud-latest:
uses: ./.github/workflows/autobuild-apps-tag.yml
permissions: read-all
secrets: inherit
with:
fromImage: 'ghcr.io/labring/sealos-cloud:latest'
start-sealos-cloud:
needs: [ resolve-versions ]
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.resolve-versions.outputs.matrix) }}
uses: ./.github/workflows/autobuild-apps-tag.yml
permissions: read-all
secrets: inherit
with:
fromImage: 'ghcr.io/labring/sealos-cloud:${{ matrix.version }}'