Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

Revoke Certificate

Revoke Certificate #56

Workflow file for this run

name: Revoke Certificate
# Controls when the action will run.
on:
# Run after the cert has been created
workflow_run:
workflows: ["Issue Certificate"]
types: ["completed"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
revoke-cert:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Copy ACME account key
uses: DamianReeves/write-file-action@v1.0
with:
path: 'secrets/acme.key'
contents: ${{ secrets.ACME_ACCOUNT_KEY }}
write-mode: overwrite
- name: Copy certificate chain
uses: DamianReeves/write-file-action@v1.0
with:
path: 'secrets/cert.cer'
contents: ${{ secrets.CERT_PUBLIC_CHAIN }}
write-mode: overwrite
#- name: Copy certificate private key
# uses: kitek/decode-base64-into-file-action@1.0
# with:
# encoded-value: ${{ secrets.CERT_PRIVATE_KEY }}
# destination-file: secrets/cert.pfx
#- name: Remove private key protection
# run: openssl pkcs12 -in ${{ github.workspace }}/secrets/cert.pfx -nocerts -out ${{ github.workspace }}/secrets/cert.key -nodes -password pass:''
- name: Revoke certificate
uses: cinderblockgames/letsencrypt-revoke-action@v1.0.0
with:
# REQUIRED
acmeAccountKeyPath: 'secrets/acme.key'
certChainPath: 'secrets/cert.cer'
#certKeyPath: 'secrets/cert.key'
#reason: 'KeyCompromise'