@@ -21,57 +21,35 @@ on: # yamllint disable-line rule:truthy
21
21
required : true
22
22
23
23
jobs :
24
- attempt1 :
25
- name : restart (${{ inputs.environ }}) attempt 1
26
- strategy :
27
- fail-fast : false
28
- matrix : ${{ fromJSON(inputs.app_names) }}
29
- uses : ./.github/workflows/restart-attempt.yml
30
- secrets : inherit
31
- with :
32
- environ : ${{ inputs.environ }}
33
- app_url : ${{ inputs.app_url }}
34
- app : ${{ matrix.app }}
35
- smoketest : ${{ matrix.smoketest }}
36
- sleep_before : false
37
-
38
- attempt2 :
39
- name : restart (${{ inputs.environ }}) attempt 2
40
- needs : attempt1
41
- strategy :
42
- fail-fast : false
43
- matrix : ${{ fromJSON(inputs.app_names) }}
44
- uses : ./.github/workflows/restart-attempt.yml
45
- secrets : inherit
46
- with :
47
- environ : ${{ inputs.environ }}
48
- app_url : ${{ inputs.app_url }}
49
- app : ${{ matrix.app }}
50
- smoketest : ${{ matrix.smoketest }}
51
- sleep_before : true
52
-
53
- attempt3 :
54
- name : restart (${{ inputs.environ }}) attempt 3
55
- needs : attempt2
24
+ restart :
25
+ name : restart (${{ inputs.environ }})
26
+ environment : ${{ inputs.environ }}
27
+ runs-on : ubuntu-latest
56
28
strategy :
57
29
fail-fast : false
58
30
matrix : ${{ fromJSON(inputs.app_names) }}
59
- uses : ./.github/workflows/restart-attempt.yml
60
- secrets : inherit
61
- with :
62
- environ : ${{ inputs.environ }}
63
- app_url : ${{ inputs.app_url }}
64
- app : ${{ matrix.app }}
65
- smoketest : ${{ matrix.smoketest }}
66
- sleep_before : true
67
-
68
- report_failures :
69
- name : report failures
70
- if : ${{ failure() && github.ref == 'refs/heads/main' }}
71
- needs : [attempt1, attempt2, attempt3]
72
- runs-on : ubuntu-latest
73
31
steps :
32
+ - name : checkout datagov
33
+ uses : actions/checkout@v4
34
+ with :
35
+ repository : gsa/data.gov
36
+ path : " ./datagov"
37
+ - name : restart ${{ matrix.app }}
38
+ uses : cloud-gov/cg-cli-tools@main
39
+ with :
40
+ command : datagov/bin/check-and-renew ${{ matrix.app }} restart
41
+ cf_org : gsa-datagov
42
+ cf_space : ${{ inputs.environ }}
43
+ cf_username : ${{secrets.CF_SERVICE_USER}}
44
+ cf_password : ${{secrets.CF_SERVICE_AUTH}}
45
+ - name : smoke test
46
+ if : ${{ matrix.smoketest }}
47
+ run : |
48
+ sleep 10
49
+ curl --fail --silent ${{ inputs.app_url }}\
50
+ /api/action/status_show?$(date +%s)
74
51
- name : Create Issue if it fails 😢
52
+ if : ${{ failure() && github.ref == 'refs/heads/main' }}
75
53
uses : JasonEtco/create-an-issue@v2
76
54
env :
77
55
GITHUB_TOKEN : ${{ secrets.ADD_TO_PROJECT_PAT }}
0 commit comments