9
9
paths :
10
10
- " .github/workflows/check-certificates.ya?ml"
11
11
schedule :
12
- # run every 10 hours
12
+ # Run every 10 hours.
13
13
- cron : " 0 */10 * * *"
14
14
workflow_dispatch :
15
15
repository_dispatch :
16
16
17
17
env :
18
- # Begin notifications when there are less than this many days remaining before expiration
18
+ # Begin notifications when there are less than this many days remaining before expiration.
19
19
EXPIRATION_WARNING_PERIOD : 30
20
20
21
21
jobs :
@@ -32,17 +32,18 @@ jobs:
32
32
33
33
matrix :
34
34
certificate :
35
- - identifier : macOS signing certificate # Text used to identify the certificate in notifications
36
- certificate-secret : APPLE_SIGNING_CERTIFICATE_P12 # The name of the secret that contains the certificate
37
- password-secret : KEYCHAIN_PASSWORD # The name of the secret that contains the certificate password
35
+ # Additional certificate definitions can be added to this list.
36
+ - identifier : macOS signing certificate # Text used to identify certificate in notifications.
37
+ certificate-secret : APPLE_SIGNING_CERTIFICATE_P12 # Name of the secret that contains the certificate.
38
+ password-secret : KEYCHAIN_PASSWORD # Name of the secret that contains the certificate password.
38
39
- identifier : Windows signing certificate
39
40
certificate-secret : WINDOWS_SIGNING_CERTIFICATE_PFX
40
41
password-secret : WINDOWS_SIGNING_CERTIFICATE_PASSWORD
41
42
42
43
steps :
43
44
- name : Set certificate path environment variable
44
45
run : |
45
- # See: https://docs.github.com/en/free-pro-team@latest/ actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
46
+ # See: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
46
47
echo "CERTIFICATE_PATH=${{ runner.temp }}/certificate.p12" >> "$GITHUB_ENV"
47
48
48
49
- name : Decode certificate
64
65
exit 1
65
66
)
66
67
67
- # See: https://github.com/rtCamp/action-slack-notify
68
68
- name : Slack notification of certificate verification failure
69
69
if : failure()
70
70
uses : rtCamp/action-slack-notify@v2.1.0
@@ -104,7 +104,7 @@ jobs:
104
104
105
105
DAYS_BEFORE_EXPIRATION="$((($(date --utc --date="$EXPIRATION_DATE" +%s) - $(date --utc +%s)) / 60 / 60 / 24))"
106
106
107
- # Display the expiration information in the log
107
+ # Display the expiration information in the log.
108
108
echo "Certificate expiration date: $EXPIRATION_DATE"
109
109
echo "Days remaining before expiration: $DAYS_BEFORE_EXPIRATION"
110
110
@@ -119,7 +119,7 @@ jobs:
119
119
fi
120
120
121
121
- name : Slack notification of pending certificate expiration
122
- # Don't send spurious expiration notification if verification fails
122
+ # Don't send spurious expiration notification if verification fails.
123
123
if : failure() && steps.check-expiration.outcome == 'failure'
124
124
uses : rtCamp/action-slack-notify@v2.1.0
125
125
env :
0 commit comments