terraform/.forgejo/workflows/non-lab.yml

33 lines
994 B
YAML
Raw Normal View History

2024-09-02 11:20:23 +02:00
on:
push:
branches:
- 'main'
2024-09-02 08:44:17 +00:00
2024-09-02 10:32:51 +02:00
jobs:
2024-09-02 10:50:35 +02:00
non-lab:
2024-09-02 10:32:51 +02:00
runs-on: docker
2024-09-02 09:00:46 +00:00
#container:
# image: ghcr.io/opentofu/opentofu:1.7.2
2024-09-02 10:32:51 +02:00
steps:
2024-09-02 10:56:38 +02:00
- uses: actions/checkout@v4
with:
sparse-checkout: |
non-lab
2024-09-02 11:11:58 +02:00
- name: Setup OpenTofu
2024-09-02 11:41:21 +02:00
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: Setup Kubernetes client
run: |
export B2_APPLICATION_KEY=${{ secrets.B2_APPLICATION_KEY }}
2024-09-02 11:50:43 +02:00
echo ${{ env.B2_APPLICATION_KEY_ID}}
2024-09-02 11:20:23 +02:00
- name: Tofu init
2024-09-02 11:24:39 +02:00
working-directory: ${{ github.workspace }}/non-lab
2024-09-02 11:43:39 +02:00
run: |
export KUBE_CONFIG_PATH="/tmp/kubeconfig"
2024-09-02 11:52:14 +02:00
echo ${{ secrets.KUBE_CONFIG_BASE64 }} | base64 -d > ${KUBE_CONFIG_PATH}
2024-09-02 11:43:39 +02:00
tofu init
2024-09-02 11:41:21 +02:00
- run: echo ${B2_APPLICATION_KEY_ID}