Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/surmon-china/action-ssl-cert-expiry-checker
Check SSL certificate expiry time for your domains
https://github.com/surmon-china/action-ssl-cert-expiry-checker
check-ssl-cert ssl-certificate ssl-certificate-check ssl-certificate-expiring
Last synced: 3 months ago
JSON representation
Check SSL certificate expiry time for your domains
- Host: GitHub
- URL: https://github.com/surmon-china/action-ssl-cert-expiry-checker
- Owner: surmon-china
- License: mit
- Created: 2024-07-29T21:27:00.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-07-30T00:44:24.000Z (5 months ago)
- Last Synced: 2024-07-31T04:43:53.944Z (5 months ago)
- Topics: check-ssl-cert, ssl-certificate, ssl-certificate-check, ssl-certificate-expiring
- Language: JavaScript
- Homepage: https://github.com/marketplace/actions/ssl-certificate-expiry-checker
- Size: 230 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SSL Certificate Expiry Checker
Check SSL certificate expiry time for your domains.
## Inputs
### `domain`
**Required**: The site domain to be checked (without protocol).
## Outputs
### `ssl-expire-date`
The expiration date of the SSL certificate.
### `ssl-expire-days-left`
The number of days left until the SSL certificate expires.
## Example Usage
```yaml
- name: Check domain SSL expire date
id: check-ssl-expiry
uses: surmon-china/[email protected]
with:
domain: surmon.me- run: echo 'SSL cert has ${{ steps.check-ssl-expiry.outputs.ssl-expire-days-left }} days left'
if: ${{ steps.check-ssl.outputs.ssl-expire-days-left }}
```### Advanced Example
You can create a workflow based on this action to check your domains. This workflow will be scheduled by cron to run every day around 8:00 UTC (it might be slightly delayed due to GitHub’s scheduling).
If the SSL certificate’s lifespan (number of days) is below a specified limit (e.g., 10 days), it will create a new issue.
```yaml
name: Check domainson:
schedule:
- cron: "0 8 * * *"jobs:
check-ssl-expiry:
runs-on: ubuntu-latest
name: Check domain SSL certificates expire time
strategy:
matrix:
domain:
- github.com
- surmon.mesteps:
- name: Check domain SSL certificates expire time
id: check-ssl-expiry
uses: surmon-china/[email protected]
with:
domain: ${{ matrix.domain }}- name: Create an issue if SSL lifespan days number is below limit
if: ${{ steps.check-ssl-expiry.outputs.ssl-expire-days-left < 10 }}
uses: rishabhgupta/git-action-issue@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: ${{ matrix.domain }} — SSL cert expires in ${{ steps.check-ssl-expiry.outputs.ssl-expire-days-left }} days
body: ${{ steps.check-ssl-expiry.outputs.ssl-expire-date }}
```## License
Licensed under the [MIT](/LICENSE) License.