Skip to content

Commit

Permalink
ci: check more than 100 workflow runs for status (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
knolleary committed Jun 25, 2024
2 parents c83432b + fcbaaa6 commit 04987fa
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/helm-chart-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ jobs:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Wait for container images build
run: |
while :; do
result=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }}/actions/runs | \
jq -r '.workflow_runs | map(select(.name == "Release container images")) | sort_by(.created_at) | reverse | .[0]')
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
Expand All @@ -36,19 +39,12 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Helm
if: true
uses: azure/setup-helm@v4
with:
token: ${{ github.token }}

- name: Add dependencies
if: true
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
Expand Down

0 comments on commit 04987fa

Please sign in to comment.