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 9d911cb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ 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: |
expire_date=$( date --date="$(openssl x509 -enddate -noout -in <(echo $NGINX_CRT) | cut -d= -f2)" --iso-8601 )
echo "NGINX Plus cert expires on $expire_date"
echo "Checking if cert will expire in 7 days..."
openssl x509 -checkend 604800 -noout -in <(echo $NGINX_CRT) || exit 1
- name: Switch Repository (Nightly)
if: (github.event_name == 'schedule')
run: |
Expand Down

0 comments on commit 9d911cb

Please sign in to comment.