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