Wait until spring-boot.rb is available when updating Homebrew tap

Closes gh-41561
This commit is contained in:
Andy Wilkinson 2024-07-22 09:05:30 +01:00
parent 8e82aad6ff
commit 682a5b27aa
3 changed files with 27 additions and 10 deletions

View File

@ -0,0 +1,20 @@
name: Await HTTP Resource
description: Waits for an HTTP resource to be available (a HEAD request succeeds)
inputs:
url:
description: 'The URL of the resource to await'
required: true
runs:
using: composite
steps:
- name: Await HTTP resource
shell: bash
run: |
url=${{ inputs.url }}
echo "Waiting for $url"
until curl --fail --head --silent ${{ inputs.url }} > /dev/null
do
echo "."
sleep 60
done
echo "$url is available"

View File

@ -38,13 +38,6 @@ runs:
release: true
generate-checksums: true
- name: Await
shell: bash
run: |
url=${{ format('https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot/{0}/spring-boot-{0}.jar', inputs.spring-boot-version) }}
echo "Waiting for $url"
until curl --fail --head --silent $url > /dev/null
do
echo "."
sleep 60
done
echo "$url is available"
uses: ./.github/actions/await-http-resource
with:
url: ${{ format('https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot/{0}/spring-boot-{0}.jar', inputs.spring-boot-version) }}

View File

@ -16,6 +16,10 @@ runs:
path: updated-homebrew-tap-repo
repository: spring-io/homebrew-tap
token: ${{ inputs.token }}
- name: Await Formula
uses: ./.github/actions/await-http-resource
with:
url: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-cli/${{ inputs.spring-boot-version }}/spring-boot-cli-${{ inputs.spring-boot-version }}-homebrew.rb
- name: Update Homebrew Tap
shell: bash
run: |