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

Upload Certificate #123

Upload Certificate

Upload Certificate #123

Workflow file for this run

name: Upload Certificate
# Controls when the action will run.
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
upload-cert:
runs-on: ubuntu-20.04
#if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Set up git directory
uses: actions/checkout@v2.3.4
- name: Copy certificate public chain
uses: DamianReeves/write-file-action@v1.0
with:
path: docs/cert/wildcard.homelab.express.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: docs/cert/wildcard.homelab.express.pfx
- name: Remove private key protection
run: openssl pkcs12 -in ${{ github.workspace }}/docs/cert/wildcard.homelab.express.pfx -nocerts -out ${{ github.workspace }}/docs/cert/wildcard.homelab.express.key -nodes -keypbe NONE -certpbe NONE -password pass:''
- name: set up git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: commit
run: |
# Stage, commit, and push
git add -f docs/cert/*
git commit -m "Updated cert."
git push origin main