Moving Vault unseal job from rinoa-docker to here.
Auto-Unseal for Vault / Unseal Vault (push) Successful in 23s

This commit is contained in:
2025-08-31 22:29:51 -04:00
parent e6178f7984
commit cf10655400
@@ -0,0 +1,54 @@
name: Auto-Unseal for Vault
on:
workflow_dispatch:
schedule:
- cron: '30 5 * * *'
env:
HC_VAULT_VERSION: '1.20.0'
jobs:
auto-unseal:
name: Unseal Vault
runs-on: ubuntu-latest
env:
VAULT_ADDR: ${{ secrets.VAULT_ADDR }}
VAULT_TOKEN: ${{ secrets.VAULT_GITEA_TOKEN }}
VAULT_SHARDS: ${{ secrets.VAULT_UNSEAL_SHARDS }}
VAULT_NAMESPACE: ""
steps:
- name: Vault Unseal Start
uses: eikendev/gotify-action@master
with:
gotify_api_base: '${{ secrets.GOTIFY_URL }}'
gotify_app_token: '${{ secrets.RUNNER_GOTIFY_TOKEN }}'
notification_title: 'GITEA: HC Vault @ Rinoa'
notification_message: 'Hashicorp Vault unsealing started... 🔐'
- name: Cache Vault install
id: cache-vault
uses: actions/cache@v4
with:
path: /opt/hostedtoolcache/vault/${{ env.HC_VAULT_VERSION }}/x64
key: vault-${{ runner.os }}-${{ env.HC_VAULT_VERSION }}
- name: Install Vault (only if not cached)
if: steps.cache-vault.outputs.cache-hit != 'true'
uses: cpanato/vault-installer@main
with:
version: ${{ env.HC_VAULT_VERSION }}
- name: Unseal Vault
run: |
for vault_shard in $VAULT_SHARDS; do
vault operator unseal -address="${VAULT_ADDR}" -non-interactive "${vault_shard}"
done
- name: Vault Unseal Completion
uses: eikendev/gotify-action@master
with:
gotify_api_base: '${{ secrets.GOTIFY_URL }}'
gotify_app_token: '${{ secrets.RUNNER_GOTIFY_TOKEN }}'
notification_title: 'GITEA: HC Vault @ Rinoa'
notification_message: 'Hashicorp Vault unsealed! 🔓'