mirror of
https://github.com/rodneyosodo/homelab.git
synced 2026-08-07 07:15:03 +00:00
0efcadb357
Bumps the gh-dependency group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 6 to 7 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: gh-dependency ... Signed-off-by: dependabot[bot] <support@github.com>
97 lines
2.0 KiB
YAML
97 lines
2.0 KiB
YAML
name: Continuous Integration
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
pre-commit:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.14"
|
|
|
|
- uses: pre-commit/action@v3.0.1
|
|
|
|
docker-compose:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Pull docker images
|
|
run: |
|
|
cd docker-compose
|
|
cp default.env .env
|
|
make validate
|
|
|
|
terraform:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
machines: [bohr, galana, tana, turkwel, yala]
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Setup Terraform
|
|
uses: hashicorp/setup-terraform@v4
|
|
|
|
- name: Terraform fmt check
|
|
run: terraform fmt -check
|
|
working-directory: terraform/${{ matrix.machines }}
|
|
|
|
- name: Terraform init
|
|
run: terraform init -backend=false
|
|
working-directory: terraform/${{ matrix.machines }}
|
|
|
|
- name: Terraform validate
|
|
run: terraform validate
|
|
working-directory: terraform/${{ matrix.machines }}
|
|
|
|
ansible:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.14"
|
|
|
|
- name: Install ansible
|
|
run: pip install ansible-core
|
|
|
|
- name: Run ansible syntax check
|
|
working-directory: ansible
|
|
run: |
|
|
for playbook in playbooks/*.yaml; do
|
|
echo "Checking $playbook"
|
|
ansible-playbook --syntax-check "$playbook"
|
|
done
|