99 paths :
1010 - " .github/workflows/check-certificates.ya?ml"
1111 schedule :
12- # run every 10 hours
12+ # Run every 10 hours.
1313 - cron : " 0 */10 * * *"
1414 workflow_dispatch :
1515 repository_dispatch :
1616
1717env :
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.
1919 EXPIRATION_WARNING_PERIOD : 30
2020
2121jobs :
@@ -31,17 +31,18 @@ jobs:
3131
3232 matrix :
3333 certificate :
34- - identifier : macOS signing certificate # Text used to identify the certificate in notifications
35- certificate-secret : INSTALLER_CERT_MAC_P12 # The name of the secret that contains the certificate
36- password-secret : INSTALLER_CERT_MAC_PASSWORD # The name of the secret that contains the certificate password
34+ # Additional certificate definitions can be added to this list.
35+ - identifier : macOS signing certificate # Text used to identify certificate in notifications.
36+ certificate-secret : INSTALLER_CERT_MAC_P12 # Name of the secret that contains the certificate.
37+ password-secret : INSTALLER_CERT_MAC_PASSWORD # Name of the secret that contains the certificate password.
3738 - identifier : Windows signing certificate
3839 certificate-secret : INSTALLER_CERT_WINDOWS_PFX
3940 password-secret : INSTALLER_CERT_WINDOWS_PASSWORD
4041
4142 steps :
4243 - name : Set certificate path environment variable
4344 run : |
44- # See: https://docs.github.com/en/free-pro-team@latest/ actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
45+ # See: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
4546 echo "CERTIFICATE_PATH=${{ runner.temp }}/certificate.p12" >> "$GITHUB_ENV"
4647 - name : Decode certificate
4748 env :
6061 echo "::error::Verification of ${{ matrix.certificate.identifier }} failed!!!"
6162 exit 1
6263 )
63- # See: https://github.com/rtCamp/action-slack-notify
6464 - name : Slack notification of certificate verification failure
6565 if : failure()
6666 uses : rtCamp/action-slack-notify@v2
9898 )
9999 )"
100100 DAYS_BEFORE_EXPIRATION="$((($(date --utc --date="$EXPIRATION_DATE" +%s) - $(date --utc +%s)) / 60 / 60 / 24))"
101- # Display the expiration information in the log
101+ # Display the expiration information in the log.
102102 echo "Certificate expiration date: $EXPIRATION_DATE"
103103 echo "Days remaining before expiration: $DAYS_BEFORE_EXPIRATION"
104104 echo "::set-output name=days::$DAYS_BEFORE_EXPIRATION"
@@ -110,7 +110,7 @@ jobs:
110110 exit 1
111111 fi
112112 - name : Slack notification of pending certificate expiration
113- # Don't send spurious expiration notification if verification fails
113+ # Don't send spurious expiration notification if verification fails.
114114 if : failure() && steps.check-expiration.outcome == 'failure'
115115 uses : rtCamp/action-slack-notify@v2
116116 env :
0 commit comments