Skip to content

Commit

Permalink
Add check for NGINX Plus cert
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome committed Aug 14, 2023
1 parent 8460a36 commit cc0d80c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ jobs:
- name: Determine NGINX Plus version
run: echo "NGINX_PLUS_VERSION=$(cat Makefile | grep -m1 NGINX_PLUS_VERSION | cut -d "=" -f2)" >> $GITHUB_ENV

- name: Check if NGINX Plus cert is still valid
env:
NGINX_CRT: ${{ secrets.NGINX_CRT }}
run: |
date=$(echo "$NGINX_CRT" | openssl x509 -enddate -noout | cut -d= -f2)
expire_date=$(date --date="$date" --iso-8601)
echo "NGINX Plus cert expires on $expire_date"
echo "Checking if cert will expire in 7 days..."
echo "$NGINX_CRT" | openssl x509 -checkend 604800 -noout || exit 1
- name: Switch Repository (Nightly)
if: (github.event_name == 'schedule')
run: |
Expand Down

0 comments on commit cc0d80c

Please sign in to comment.