ViliusSutkus89 / WaitForURLsToBeAvailable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wait for URLs to be available

build

The why

I need to pause a CI workflow until a set of URLs become available.

Example workflow

name: build
on: push

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - run: ./library/buildAndPublish
      - id: getPublishedLibraryURLs
        run: echo ::set-output name=URLs::'["https://www.example.org/file1", "https://www.example.org/file2"]'

      - uses: ViliusSutkus89/WaitForURLsToBeAvailable@v1
        with:
          URLs: ${{ steps.getPublishedLibraryURLs.outputs.URLs }}

      - uses: ViliusSutkus89/WaitForURLsToBeAvailable@v1
        with:
          URLs: '["https://www.example.org/file3", "https://www.example.org/file4"]'

      - run: ./applicationDependingOnPublishedLibrary/build  

Inputs

Name Required Description
URLs Yes JSON encoded array of URLs to be checked
timeoutSeconds No, defaults to 60 How long to wait after a failed check before retrying?
tryCount No, defaults to 20 How many times to try checking before assuming failure?

About

License:MIT License


Languages

Language:TypeScript 100.0%