release-for-ec #38
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: release-for-ec | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: "Tag to use for building images and tagging Helm chart (must end with -ec.<digit>, e.g. v1.128.2-ec.1)" | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| jobs: | |
| validate-tag: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Validate tag format | |
| run: | | |
| if ! [[ "${{ inputs.tag }}" =~ ^v ]]; then | |
| echo "Error: Tag must start with 'v' (e.g. v1.128.2-ec.1)" | |
| exit 1 | |
| fi | |
| if ! [[ "${{ inputs.tag }}" =~ -ec\.[0-9]+$ ]]; then | |
| echo "Error: Tag must end with -ec.<digit> suffix (e.g. v1.128.2-ec.1)" | |
| exit 1 | |
| fi | |
| echo "Tag format is valid: ${{ inputs.tag }}" | |
| build-migrations-melange-packages: | |
| needs: [validate-tag] | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| runner: | |
| [ | |
| { name: ubuntu-latest, arch: amd64 }, | |
| { name: arm64-runner-set, arch: arm64 }, | |
| ] | |
| runs-on: ${{ matrix.runner.name }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/build-custom-melange-package | |
| with: | |
| context: migrations/deploy | |
| component: kotsadm-migrations | |
| git-tag: ${{ inputs.tag }} | |
| arch: ${{ matrix.runner.arch }} | |
| build-migrations: | |
| runs-on: ubuntu-latest | |
| needs: [build-migrations-melange-packages] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/build-custom-image-with-apko | |
| with: | |
| context: migrations/deploy | |
| component: kotsadm-migrations | |
| git-tag: ${{ inputs.tag }} | |
| image-name: index.docker.io/kotsadm/kotsadm-migrations:${{ inputs.tag }} | |
| registry-username: ${{ secrets.DOCKERHUB_USER }} | |
| registry-password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| build-kurl-proxy-melange-packages: | |
| needs: [validate-tag] | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| runner: | |
| [ | |
| { name: ubuntu-latest, arch: amd64 }, | |
| { name: arm64-runner-set, arch: arm64 }, | |
| ] | |
| runs-on: ${{ matrix.runner.name }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/build-custom-melange-package | |
| with: | |
| context: kurl_proxy/deploy | |
| component: kurl-proxy | |
| git-tag: ${{ inputs.tag }} | |
| arch: ${{ matrix.runner.arch }} | |
| build-kurl-proxy: | |
| runs-on: ubuntu-latest | |
| needs: [build-kurl-proxy-melange-packages] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/build-custom-image-with-apko | |
| with: | |
| context: kurl_proxy/deploy | |
| component: kurl-proxy | |
| git-tag: ${{ inputs.tag }} | |
| image-name: index.docker.io/kotsadm/kurl-proxy:${{ inputs.tag }} | |
| registry-username: ${{ secrets.DOCKERHUB_USER }} | |
| registry-password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| build-kotsadm-melange-packages: | |
| needs: [validate-tag] | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| runner: | |
| [ | |
| { name: ubuntu-latest, arch: amd64 }, | |
| { name: arm64-runner-set, arch: arm64 }, | |
| ] | |
| runs-on: ${{ matrix.runner.name }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/build-custom-melange-package | |
| with: | |
| context: deploy | |
| component: kotsadm | |
| git-tag: ${{ inputs.tag }} | |
| arch: ${{ matrix.runner.arch }} | |
| build-kotsadm: | |
| runs-on: ubuntu-latest | |
| needs: [build-kotsadm-melange-packages] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/build-custom-image-with-apko | |
| with: | |
| context: deploy | |
| component: kotsadm | |
| git-tag: ${{ inputs.tag }} | |
| image-name: index.docker.io/kotsadm/kotsadm:${{ inputs.tag }} | |
| registry-username: ${{ secrets.DOCKERHUB_USER }} | |
| registry-password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| tag-helm-chart: | |
| runs-on: ubuntu-latest | |
| needs: [build-migrations, build-kurl-proxy, build-kotsadm] | |
| steps: | |
| - name: Checkout Chart | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: replicatedhq/kots-helm | |
| token: ${{ secrets.GH_PAT }} | |
| ref: main | |
| - name: Tag Chart | |
| run: | | |
| git tag "${{ inputs.tag }}+${GITHUB_SHA:0:7}" | |
| git push origin "${{ inputs.tag }}+${GITHUB_SHA:0:7}" |