Skip to content

release-0.24.1

release-0.24.1 #25

Workflow file for this run

name: release_chart
on:
release:
types: [ published ]
jobs:
release_chart:
name: Release Chart
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install chart-releaser
run: |
wget https://github.com/helm/chart-releaser/releases/download/v1.4.1/chart-releaser_1.4.1_linux_amd64.tar.gz
tar -zxf chart-releaser_1.4.1_linux_amd64.tar.gz cr
sudo install cr /usr/local/bin/
rm -f cr chart-releaser_1.4.1_linux_amd64.tar.gz
- name: Package Chart
run: cr package deploy/helm/clickhouse-operator
- name: Get Release Assets
run: |
CHART_PATH=$(ls .cr-release-packages/altinity-clickhouse-operator-*.tgz)
ASSET_NAME=$(basename ${CHART_PATH})
ASSET_ID=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }}/assets" | \
jq -r ".[] | select(.name == \"$ASSET_NAME\") | .id")
echo "Asset ID is $ASSET_ID"
echo "::set-output name=asset_id::$ASSET_ID"
- name: Delete Existing Release Artifacts
if: steps.get_assets.outputs.asset_id != ''
run: |

Check failure on line 42 in .github/workflows/release_chart.yaml

View workflow run for this annotation

GitHub Actions / release_chart

Invalid workflow file

The workflow is not valid. .github/workflows/release_chart.yaml (Line: 42, Col: 14): The expression is not closed. An unescaped ${{ sequence was found, but the closing }} sequence was not found.

Check failure on line 42 in .github/workflows/release_chart.yaml

View workflow run for this annotation

GitHub Actions / release_chart

Invalid workflow file

The workflow is not valid. .github/workflows/release_chart.yaml (Line: 42, Col: 14): The expression is not closed. An unescaped ${{ sequence was found, but the closing }} sequence was not found.
curl -X DELETE -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository
- name: Upload Release Artifacts
run: |
CHART_PATH=$(ls .cr-release-packages/altinity-clickhouse-operator-*.tgz)
curl -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/gzip" \
-T "${CHART_PATH}" \
"https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ github.event.release.id }}/assets?name=$(basename ${CHART_PATH})"
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Release Chart
run: |
git remote add httpsorigin "https://github.com/${GITHUB_REPOSITORY}.git"
git fetch httpsorigin
cr index \
--git-repo=${GITHUB_REPOSITORY#*/} \
--owner=${GITHUB_REPOSITORY_OWNER} \
--release-name-template=${{ github.event.release.name }} \
--token=${{ secrets.GITHUB_TOKEN }} \
--index-path=index.yaml \
--remote=httpsorigin \
--push