udpate
This commit is contained in:
@@ -8,16 +8,16 @@ jobs:
|
|||||||
lint:
|
lint:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: node:20-alpine
|
image: node:20-bullseye
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install linters
|
- name: Install Python & linters
|
||||||
run: |
|
run: |
|
||||||
apk add --no-cache python3 py3-pip bash git
|
apt-get update && apt-get install -y python3 python3-pip bash git
|
||||||
pip install --upgrade pip
|
pip3 install --upgrade pip
|
||||||
pip install yamllint ansible-lint
|
pip3 install yamllint ansible-lint
|
||||||
|
|
||||||
- name: Run linters
|
- name: Run linters
|
||||||
run: |
|
run: |
|
||||||
@@ -27,7 +27,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: node:20-alpine
|
image: node:20-bullseye
|
||||||
needs: lint
|
needs: lint
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@@ -35,7 +35,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Install Docker CLI
|
- name: Install Docker CLI
|
||||||
run: |
|
run: |
|
||||||
apk add --no-cache docker bash git
|
apt-get update && apt-get install -y docker.io bash git
|
||||||
dockerd & sleep 5
|
dockerd & sleep 5
|
||||||
|
|
||||||
- name: Login to Gitea Registry
|
- name: Login to Gitea Registry
|
||||||
@@ -54,7 +54,7 @@ jobs:
|
|||||||
deploy:
|
deploy:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: node:20-alpine
|
image: node:20-bullseye
|
||||||
needs: build
|
needs: build
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@@ -62,15 +62,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Install Ansible & dependencies
|
- name: Install Ansible & dependencies
|
||||||
run: |
|
run: |
|
||||||
apk add --no-cache openssh bash git python3 py3-pip
|
apt-get update && apt-get install -y python3 python3-pip openssh-client bash git
|
||||||
pip install ansible
|
pip3 install --upgrade pip
|
||||||
|
pip3 install ansible
|
||||||
- name: Setup SSH
|
|
||||||
run: |
|
|
||||||
mkdir -p ~/.ssh
|
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
|
||||||
chmod 600 ~/.ssh/id_rsa
|
|
||||||
ssh-keyscan -H <SERVER_IP> >> ~/.ssh/known_hosts
|
|
||||||
|
|
||||||
- name: Run Ansible deployment
|
- name: Run Ansible deployment
|
||||||
run: ansible-playbook -i ansible/inventory.yaml site.yaml
|
run: ansible-playbook -i ansible/inventory.yaml site.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user