Skip to content

ci: check more than 100 workflow runs for status #44

ci: check more than 100 workflow runs for status

ci: check more than 100 workflow runs for status #44

name: Release Helm Chart
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Wait for container images build
run: |
while :; do
result=$(gh api repos/:owner/:repo/actions/workflows | jq -r '.workflows[] | select(.name=="Release container images") | .id' | xargs -I {} gh api repos/:owner/:repo/actions/workflows/{}/runs --jq '.workflow_runs | max_by(.run_number)')
status=$(echo "$result" | jq -r '.status')
conclusion=$(echo "$result" | jq -r '.conclusion')
if [[ "$status" == "completed" ]]; then
if [[ "$conclusion" == "success" ]]; then
echo "Release container images workflow completed successfully"
break
else
echo "Release container images workflow failed"
exit 1
fi
elif [[ "$status" == "in_progress" ]]; then
echo "Release container images workflow is still running"
sleep 60
else
echo "Release container images workflow returned unexpected status: $status"
exit 1
fi
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
if: false
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Helm
if: false
uses: azure/setup-helm@v4
with:
token: ${{ github.token }}
- name: Add dependencies
if: false
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Configure git
if: false
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: Semantic Release
if: false
id: semantic-release
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
semantic_version: 19.0.5
branch: main
extra_plugins: |
semantic-release-helm3@2.9.3
- name: Run chart-releaser
if: false
uses: helm/chart-releaser-action@v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
charts_dir: helm
config: .github/configs/cr.yaml
skip_existing: true