This repository has been archived by the owner on Dec 20, 2023. It is now read-only.
Create a flyte release #1
This file contains 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: Create a flyte release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "version name. example v0.1.1" | |
required: true | |
jobs: | |
bump-version: | |
name: bump-version | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.bump-version.outputs.tag }} | |
strategy: | |
matrix: | |
component: | |
[ | |
"flytepropeller/", | |
"flyteadmin/", | |
"datacatalog/", | |
"flytecopilot/", | |
"flyteplugins/", | |
"flytestdlib/", | |
"", | |
] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: "0" | |
- name: Bump version and push tag | |
id: bump-version | |
uses: anothrNick/github-tag-action@1.36.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WITH_V: true | |
CUSTOM_TAG: ${{ matrix.component }}${{ github.event.inputs.version }} | |
RELEASE_BRANCHES: master | |
publish-flyte-binary-image: | |
name: Publish flyte binary image for the release version | |
runs-on: ubuntu-latest | |
needs: [bump-version] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: "0" | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: "${{ secrets.FLYTE_BOT_USERNAME }}" | |
password: "${{ secrets.FLYTE_BOT_PAT }}" | |
- name: Tag image to release version | |
run: | | |
for release in latest ${{ needs.bump-version.outputs.version }}; do | |
docker buildx imagetools create --tag "ghcr.io/flyteorg/flyte-binary-release:${release}" "ghcr.io/flyteorg/flyte-binary:sha-${{ github.sha }}" | |
done | |
publish-flyte-component-image: | |
name: Publish flyte component image for the release version | |
runs-on: ubuntu-latest | |
needs: [bump-version] | |
strategy: | |
matrix: | |
component: | |
[ | |
flyteconsole, | |
flytepropeller, | |
flyteadmin, | |
datacatalog, | |
flytescheduler, | |
flytecopilot, | |
] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: "0" | |
- name: yq - portable yaml processor | |
uses: mikefarah/yq@v4.15.1 | |
- name: Get Latest Version of component | |
id: set_version | |
run: | | |
if [ ${{ matrix.component }} = "flytecopilot" ]; then | |
echo ::set-output name=version::$(yq eval '.configmap.copilot.plugins.k8s.co-pilot.image' charts/flyte-core/values.yaml | cut -d ":" -f 2 ) | |
else | |
echo ::set-output name=version::$(yq eval '.${{ matrix.component }}.image.tag' charts/flyte-core/values.yaml) | |
fi | |
shell: bash | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: "${{ secrets.FLYTE_BOT_USERNAME }}" | |
password: "${{ secrets.FLYTE_BOT_PAT }}" | |
- name: Tag Image to release version | |
run: | | |
for release in latest ${{ needs.bump-version.outputs.version }}; do | |
docker buildx imagetools create --tag "ghcr.io/flyteorg/${{ matrix.component }}-release:${release}" "ghcr.io/flyteorg/${{ matrix.component }}:${{ steps.set_version.outputs.version }}" | |
done | |
helm-release: | |
name: Flyte helm release | |
runs-on: ubuntu-latest | |
needs: [bump-version] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: "0" | |
- name: Install Helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: 'latest' # default is latest (stable) | |
token: ${{ secrets.GITHUB_TOKEN }} # only needed if version is 'latest' | |
id: install | |
- name: Configure Git | |
run: | | |
git config user.name "${{ github.actor }}" | |
git config user.email "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>" | |
- name: Preprare Flyte Helm Release | |
env: | |
VERSION: ${{ needs.bump-version.outputs.version }} | |
REPOSITORY: "https://flyteorg.github.io/flyte" | |
run: | | |
make prepare_artifacts | |
- name: Run chart-releaser | |
uses: stefanprodan/helm-gh-pages@v1.4.1 | |
with: | |
token: "${{ secrets.FLYTE_BOT_PAT }}" | |
linting: off | |
manifest-release: | |
name: Flyte manifest release | |
runs-on: ubuntu-latest | |
needs: [bump-version] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: "0" | |
- name: Prepare Flyte Release | |
env: | |
VERSION: ${{ needs.bump-version.outputs.version }} | |
run: | | |
make prepare_artifacts | |
git stash | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v2 | |
with: | |
version: latest | |
args: release --rm-dist --release-notes=CHANGELOG/CHANGELOG-${{ github.event.inputs.version }}.md | |
env: | |
GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} |