Files
a13labs.infra/.github/workflows/actions-validate.yml.disabled
T
2025-06-05 23:27:50 +02:00

69 lines
2.0 KiB
Plaintext

name: Validate CI/CD Actions
on:
push:
branches:
- main
paths:
- .github/actions/**
- .github/workflows/actions-*.yml
jobs:
test-cicd-actions:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup environment
uses: ./.github/actions/setup-env
- name: Setup Ansible environment
uses: ./.github/actions/setup-ansible-env
with:
project-id: ${{ secrets.BW_PROJECT_ID }}
organization-id: ${{ secrets.BW_ORGANIZATION_ID }}
access-token: ${{ secrets.BW_ACCESS_TOKEN }}
ansible-user: ${{ secrets.ANSIBLE_USER }}
- name: Setup Terraform environment
uses: ./.github/actions/setup-terraform-env
- name: Setup Tofu environment
uses: ./.github/actions/setup-opentofu-env
- name: Setup Kubernetes Environment
uses: ./.github/actions/setup-k8s-env
with:
project-id: ${{ secrets.BW_PROJECT_ID }}
organization-id: ${{ secrets.BW_ORGANIZATION_ID }}
access-token: ${{ secrets.BW_ACCESS_TOKEN }}
ansible-user: ${{ secrets.ANSIBLE_USER }}
- name: Get remote host info
uses: ./.github/actions/get-host-info
id: get-host-info
with:
project-id: ${{ secrets.BW_PROJECT_ID }}
organization-id: ${{ secrets.BW_ORGANIZATION_ID }}
access-token: ${{ secrets.BW_ACCESS_TOKEN }}
ansible-user: ${{ secrets.ANSIBLE_USER }}
- name: Test ansible
env:
ANSIBLE_USER: ${{ secrets.ANSIBLE_USER }}
run: |
ansible -i inventory/hosts -u ${{ secrets.ANSIBLE_USER }} -m ping public
- name: Test kubectl get nodes
run: |
kubectl get nodes --insecure-skip-tls-verify
- name: Test terraform
run: |
terraform --version
- name: Test opentofu
run: |
tofu --version