release kloudlite #168
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: release kloudlite | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- 'v*' | ||
# push: | ||
# branches: | ||
# - 'release-v*' | ||
# tags: | ||
# - '*' | ||
# paths: | ||
# - api | ||
# - operator | ||
# - infrastructure-as-code | ||
# - kubelet-metrics-reexporter | ||
# - autoscaler | ||
# - "api/**" | ||
# - "operator/**" | ||
# - "infrastructure-as-code/**" | ||
# - "kubelet-metrics-reexporter/**" | ||
# - "autoscaler/**" | ||
# - "kl/**" | ||
# - "web/**" | ||
# - ".github/workflows/**" | ||
permissions: | ||
contents: write | ||
packages: write | ||
jobs: | ||
# setup: | ||
# - uses: dorny/paths-filter@v3 | ||
# id: changes | ||
# with: | ||
# filters: | | ||
# api: | ||
# - 'api/**' | ||
# operator: | ||
# - 'operator/**' | ||
# infrastructure-as-code: | ||
# - 'infrastructure-as-code/**' | ||
web: | ||
uses: ./.github/workflows/web.yml | ||
kl: | ||
uses: ./.github/workflows/kl.yml | ||
api: | ||
uses: ./.github/workflows/api.yml | ||
operator: | ||
uses: ./.github/workflows/operator.yml | ||
infrastructure-as-code: | ||
uses: ./.github/workflows/iac.yml | ||
autoscaler: | ||
uses: ./.github/workflows/autoscaler.yml | ||
kubelet-metrics-reexporter: | ||
uses: ./.github/workflows/kubelet-metrics-reexporter.yml | ||
Check failure on line 67 in .github/workflows/release-kloudlite.yml GitHub Actions / .github/workflows/release-kloudlite.ymlInvalid workflow file
|
||
k3s: | ||
runs-on: ubuntu-latest | ||
name: supported k3s binary | ||
env: | ||
K3S_VERSION: "v1.28.6+k3s2" | ||
steps: | ||
- name: k3s binary download | ||
run: |+ | ||
curl -L0 "https://github.com/k3s-io/k3s/releases/download/$K3S_VERSION/k3s" > ./k3s | ||
- name: Upload Build Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: k3s | ||
path: ./k3s | ||
github_release: | ||
needs: | ||
- api | ||
- operator | ||
- infrastructure-as-code | ||
- autoscaler | ||
- web | ||
- kl | ||
- kubelet-metrics-reexporter | ||
runs-on: ubuntu-latest | ||
name: Creating a Github Release | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Download all artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: k3s-runner | ||
path: k3s-runner-artifacts | ||
- name: Download all artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: kl | ||
path: kl-artifacts | ||
- name: Download all artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: k3s | ||
path: k3s | ||
- run: |+ | ||
ls k3s-runner-artifacts/* | ||
ls kl-artifacts/* | ||
ls k3s/* | ||
- name: Create Release Tag from branch name | ||
id: gitref_branch | ||
if: startsWith(github.ref, 'refs/heads/release') | ||
shell: bash | ||
run: | | ||
set +e | ||
RELEASE_TAG=${GITHUB_REF#refs/heads/release-} | ||
echo "$RELEASE_TAG" | grep -i '\-nightly$' | ||
if [ $? -ne 0 ]; then | ||
RELEASE_TAG="$RELEASE_TAG-nightly" | ||
fi | ||
set -e | ||
echo "release_tag=$RELEASE_TAG" >> $GITHUB_ENV | ||
echo "override_release_assets=true" >> $GITHUB_ENV | ||
echo "github_branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | ||
- name: Create Release Tag from git tag | ||
if: startsWith(github.ref, 'refs/tags/') | ||
id: gitref_tag | ||
shell: bash | ||
run: | | ||
RELEASE_TAG=$(echo ${GITHUB_REF#refs/tags/}) | ||
echo "release_tag=$RELEASE_TAG" >> $GITHUB_ENV | ||
echo "override_release_assets=false" >> $GITHUB_ENV | ||
- name: Github Release | ||
uses: ./.github/actions/github-release/ | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
release_tag: ${{ env.release_tag }} | ||
github_ref: ${GITHUB_REF} | ||
files: |+ | ||
k3s-runner-artifacts/** | ||
kl-artifacts/** | ||
k3s/** | ||
- name: Push Nightly Release To Discord | ||
uses: ./.github/actions/discord/ | ||
with: | ||
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL_NIGHTLY }} | ||
- name: Push Release To Discord | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: ./.github/actions/discord/ | ||
with: | ||
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }} |