Skip to content

Unlock LUKS

Unlock LUKS #15

name: Unlock LUKS
on:
workflow_dispatch:
permissions: read-all
jobs:
cryptsetup-askpass:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit
- name: Install SSH key
uses: shimataro/ssh-key-action@d4fffb50872869abe2d9a9098a6d9c5aa7d16be4 # v2.7.0
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
name: id_rsa # optional
known_hosts: ${{ secrets.KNOWN_HOSTS }}
config: ${{ secrets.SSH_CONFIG }}
if_key_exists: fail
- shell: bash
env:
LUKS_PASSPHRASE: ${{ secrets.LUKS_PASSPHRASE }}
# TODO: Make this step fail if the luks device could not be opened
run: echo "$LUKS_PASSPHRASE" | ssh [email protected] cryptsetup-askpass || true