This repository has been archived by the owner on Mar 22, 2024. It is now read-only.
forked from lewagon/wait-on-check-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
78 lines (74 loc) · 2.18 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# action.yml
name: "Wait on check"
author: "progapandist"
description: "Wait on a certain check to pass for commit"
inputs:
allowed-conclusions:
description: "Array of allowed conclusions"
required: false
default: success,skipped
check-name:
description: "A name of a check that has to pass"
required: false
default: ""
check-regexp:
description: "Filter checks to wait using Regexp"
required: false
default: ""
ref:
description: "A git ref to be checked: branch/tag/commit sha"
required: true
repo-token:
description: "A GitHub token for the repo"
required: false
default: ""
wait-interval:
description: "Seconds to wait between Checks API requests"
required: false
default: "10"
api-endpoint:
description: "Github API Endpoint to use."
required: false
default: ""
running-workflow-name:
description: "Name of the workflow to be ignored (the one who is waiting for the rest)"
required: false
default: ""
verbose:
description: "Print logs if true"
required: false
default: true
runs:
using: "composite"
steps:
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2 # Not needed with a .ruby-version file
- name: Cache Ruby Gems
uses: actions/cache@v3
with:
path: ${{ github.action_path }}
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: ${{ runner.os }}-gems-
- name: Bundle Install
run: |
bundle install --jobs 4 --retry 3
working-directory: ${{ github.action_path }}
shell: bash
- run: |
ruby entrypoint.rb
working-directory: ${{ github.action_path }}
shell: bash
env:
ALLOWED_CONCLUSIONS: ${{ inputs.allowed-conclusions }}
CHECK_NAME: ${{ inputs.check-name }}
CHECK_REGEXP: ${{ inputs.check-regexp }}
REF: ${{ inputs.ref }}
REPO_TOKEN: ${{ inputs.repo-token }}
VERBOSE: ${{ inputs.verbose }}
WAIT_INTERVAL: ${{ inputs.wait-interval }}
RUNNING_WORKFLOW_NAME: ${{ inputs.running-workflow-name }}
API_ENDPOINT: ${{ inputs.api-endpoint }}
branding:
icon: "check-circle"
color: "green"