Promote SKE Pre-release #35
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: Promote SKE Pre-release | |
| on: | |
| workflow_dispatch: | |
| env: | |
| SKE_PLATFORM_IMG: "ghcr.io/syntasso/ske-platform" | |
| SKE_QUICK_START_INSTALLER_IMG: "ghcr.io/syntasso/ske-quick-start-installer" | |
| jobs: | |
| promote-pre-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out enterprise kratix | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: syntasso/enterprise-kratix | |
| ssh-key: ${{ secrets.ENTERPRISE_KRATIX_DEPLOY_KEY_READ_PUSH }} | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Set env vars | |
| run: | | |
| latest_pre_release_tag=$(gh release list --json tagName --jq '[.[] | select(.tagName | match("^v"))][0].tagName') | |
| latest_release_tag=$(echo $latest_pre_release_tag | sed 's/-rc[0-9]*//') | |
| s3_latest_release_dir="s3://syntasso-enterprise-releases/ske/${latest_release_tag}/" | |
| echo "LATEST_PRE_RELEASE_TAG=$latest_pre_release_tag" >> "$GITHUB_ENV" | |
| echo "LATEST_RELEASE_TAG=$latest_release_tag" >> "$GITHUB_ENV" | |
| echo "S3_LATEST_RELEASE_DIR=$s3_latest_release_dir" >> "$GITHUB_ENV" | |
| env: | |
| GH_TOKEN: ${{ secrets.ENTERPRISE_KRATIX_GH_TOKEN }} | |
| - name: Login to ghcr | |
| run: | | |
| echo "${{ secrets.GHCR_TOKEN }}" | docker login --username syntassodev --password-stdin ghcr.io | |
| echo "${{ secrets.GHCR_TOKEN }}" | docker login --username syntassodev --password-stdin registry.syntasso.io | |
| - name: Verify SKE release does not exist | |
| env: | |
| GH_TOKEN: ${{ secrets.ENTERPRISE_KRATIX_GH_TOKEN }} | |
| run: | | |
| ./scripts/check-ske-release-does-not-exist | |
| - name: Verify release images | |
| run: | | |
| ./scripts/verify-images ${{ env.LATEST_PRE_RELEASE_TAG }} | |
| - name: Verify SBOM artifacts | |
| run: | | |
| ./scripts/verify-sboms ${{ env.LATEST_PRE_RELEASE_TAG }} | |
| - name: Re-tag SKE artifacts to full release | |
| env: | |
| GH_TOKEN: ${{ secrets.ENTERPRISE_KRATIX_GH_TOKEN }} | |
| run: | | |
| ./scripts/retag-ske-artifacts-to-full-release | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-region: eu-west-2 | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| - name: Create SKE release | |
| env: | |
| GH_TOKEN: ${{ secrets.ENTERPRISE_KRATIX_GH_TOKEN }} | |
| run: | | |
| export TAG=${LATEST_RELEASE_TAG} | |
| ./scripts/create-release | |
| - name: Generate changelog | |
| env: | |
| GH_TOKEN: ${{ secrets.ENTERPRISE_KRATIX_GH_TOKEN }} | |
| run: | | |
| git fetch --tags | |
| ./scripts/generate-changelog | |
| changelog=$(cat final-changelog.md) | |
| echo "$changelog" >> "$GITHUB_STEP_SUMMARY" |