Files
Wordpress-Ansible/.gitea/workflows/yamllint.yml
sotos 9e042fba2d
Some checks failed
CI/CD Pipeline / lint (push) Failing after 28s
CI/CD Pipeline / build (push) Has been skipped
CI/CD Pipeline / deploy (push) Has been skipped
update
2025-12-16 11:32:23 +01:00

75 lines
1.8 KiB
YAML

---
name: CI/CD Pipeline
on:
push:
branches: [main, flip_dev]
jobs:
lint:
runs-on: docker
container:
image: node:20-bullseye
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Python & linters
run: |
apt-get update && apt-get install -y python3 python3-pip bash git
pip3 install --upgrade pip
pip3 install yamllint ansible-lint
- name: Install Ansible Collections
run: ansible-galaxy collection install community.docker
- name: Run linters
run: |
yamllint .
ansible-lint ansible/playbooks
build:
runs-on: docker
container:
image: node:20-bullseye
needs: lint
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Docker CLI
run: |
apt-get update && apt-get install -y docker.io bash git
dockerd & sleep 5
- name: Login to Gitea Registry
run: |
echo "${{ secrets.REGISTRY_PASSWORD }}" | \
docker login dns.s-martika.com \
-u "${{ secrets.REGISTRY_USER }}" \
--password-stdin
- name: Build Docker image
run: docker build -t dns.s-martika.com/smartika/snake:latest frontend/
- name: Push Docker image
run: docker push dns.s-martika.com/smartika/snake:latest
deploy:
runs-on: docker
container:
image: node:20-bullseye
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Ansible & dependencies
run: |
apt-get update && apt-get install -y python3 python3-pip openssh-client bash git
pip3 install --upgrade pip
pip3 install ansible
- name: Run Ansible deployment
run: ansible-playbook -i ansible/inventory.yaml site.yaml