diff --git a/.github/actions/await-http-resource/action.yml b/.github/actions/await-http-resource/action.yml new file mode 100644 index 00000000000..7d2b3462b53 --- /dev/null +++ b/.github/actions/await-http-resource/action.yml @@ -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" diff --git a/.github/actions/sync-to-maven-central/action.yml b/.github/actions/sync-to-maven-central/action.yml index 8ebef462a1c..e54ad040b91 100644 --- a/.github/actions/sync-to-maven-central/action.yml +++ b/.github/actions/sync-to-maven-central/action.yml @@ -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) }} diff --git a/.github/actions/update-homebrew-tap/action.yml b/.github/actions/update-homebrew-tap/action.yml index 52b20e0990a..43a1e8b77d9 100644 --- a/.github/actions/update-homebrew-tap/action.yml +++ b/.github/actions/update-homebrew-tap/action.yml @@ -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: |