2024-09-13 11:56:16 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'main'
|
2025-02-19 10:59:18 +00:00
|
|
|
path:
|
2025-04-02 17:02:08 +02:00
|
|
|
- '**/authentik/*.tf'
|
2024-09-13 11:56:16 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
authentik":
|
2025-04-02 16:49:35 +02:00
|
|
|
runs-on: ubuntu
|
2024-09-13 11:56:16 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
sparse-checkout: |
|
2024-09-13 12:51:56 +00:00
|
|
|
authentik
|
2024-09-13 11:56:16 +00:00
|
|
|
- name: Setup OpenTofu
|
|
|
|
run: |
|
|
|
|
curl -fsSl https://get.opentofu.org/install-opentofu.sh -o /tmp/install-opentofu.sh
|
|
|
|
chmod +x /tmp/install-opentofu.sh
|
|
|
|
/tmp/install-opentofu.sh --install-method deb
|
|
|
|
rm -f /tmp/install-opentofu.sh
|
|
|
|
- name: Tofu init
|
|
|
|
working-directory: ${{ github.workspace }}/authentik"
|
|
|
|
run: |
|
|
|
|
export KUBE_CONFIG_PATH="/tmp/kubeconfig"
|
|
|
|
echo ${{ secrets.KUBE_CONFIG_BASE64 }} | base64 -d > ${KUBE_CONFIG_PATH}
|
|
|
|
export AUTHENTIK_TOKEN=${{ secrets.AUTHENTIK_TOKEN }}
|
|
|
|
export AUTHENTIK_URL="https://auth.lab.cowley.tech"
|
|
|
|
tofu init
|
|
|
|
- name: Tofu Plan
|
|
|
|
working-directory: ${{ github.workspace }}/authentik"
|
|
|
|
run: |
|
|
|
|
export KUBE_CONFIG_PATH="/tmp/kubeconfig"
|
|
|
|
echo ${{ secrets.KUBE_CONFIG_BASE64 }} | base64 -d > ${KUBE_CONFIG_PATH}
|
|
|
|
export AUTHENTIK_TOKEN=${{ secrets.AUTHENTIK_TOKEN }}
|
|
|
|
export AUTHENTIK_URL="https://auth.lab.cowley.tech"
|
|
|
|
tofu plan -out tfplan
|
2025-04-02 16:49:35 +02:00
|
|
|
#- name: Tofu Apply
|
|
|
|
# working-directory: ${{ github.workspace }}/authentik"
|
|
|
|
# run: |
|
|
|
|
# export KUBE_CONFIG_PATH="/tmp/kubeconfig"
|
|
|
|
# echo ${{ secrets.KUBE_CONFIG_BASE64 }} | base64 -d > ${KUBE_CONFIG_PATH}
|
|
|
|
# export AUTHENTIK_TOKEN=${{ secrets.AUTHENTIK_TOKEN }}
|
|
|
|
# export AUTHENTIK_URL="https://auth.lab.cowley.tech"
|
|
|
|
# tofu apply tfplan
|