udpate
This commit is contained in:
@@ -8,27 +8,22 @@ jobs:
|
|||||||
lint:
|
lint:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: node:20-alpine # Node available for Gitea Actions
|
image: node:20-alpine
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install linters
|
- name: Install linters
|
||||||
run: |
|
run: |
|
||||||
apk add --no-cache python3 py3-pip bash git
|
apk add --no-cache python3 py3-pip bash git
|
||||||
python3 -m venv venv
|
|
||||||
. venv/bin/activate
|
|
||||||
pip install --upgrade pip
|
pip install --upgrade pip
|
||||||
pip install yamllint ansible-lint
|
pip install yamllint ansible-lint
|
||||||
|
|
||||||
- name: Run linters
|
- name: Run linters
|
||||||
run: |
|
run: |
|
||||||
. venv/bin/activate
|
|
||||||
yamllint .
|
yamllint .
|
||||||
ansible-lint ansible/playbooks
|
ansible-lint ansible/playbooks
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
@@ -65,7 +60,7 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install Ansible & dependencies
|
||||||
run: |
|
run: |
|
||||||
apk add --no-cache openssh bash git python3 py3-pip
|
apk add --no-cache openssh bash git python3 py3-pip
|
||||||
pip install ansible
|
pip install ansible
|
||||||
@@ -76,12 +71,6 @@ jobs:
|
|||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
||||||
chmod 600 ~/.ssh/id_rsa
|
chmod 600 ~/.ssh/id_rsa
|
||||||
ssh-keyscan -H <SERVER_IP> >> ~/.ssh/known_hosts
|
ssh-keyscan -H <SERVER_IP> >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
- name: Run Ansible deployment
|
- name: Run Ansible deployment
|
||||||
run: ansible-playbook -i ../../ansible/inventory.yaml ../../site.yml
|
run: ansible-playbook -i ansible/inventory.yaml site.yaml
|
||||||
|
|
||||||
- name: Run Ansible deployment
|
|
||||||
run: |
|
|
||||||
ansible-playbook \
|
|
||||||
-i \
|
|
||||||
./site.yml
|
|
||||||
|
|||||||
Reference in New Issue
Block a user