Fix CI workflow: remove container directive, use runner image directly
- Remove container: python:3.12-slim (lacked Node.js for actions/checkout)
- Use runner's ubuntu-latest image which has Node.js + Python pre-installed
- Fix deploy job if condition (remove ${{ }} wrapper)
- Enable debug logging in act_runner config
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3107a2c5ad
commit
6580e42f53
2 changed files with 4 additions and 9 deletions
|
|
@ -9,30 +9,25 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
syntax-check:
|
syntax-check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: python:3.12-slim
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install ansible
|
- name: Install ansible
|
||||||
run: pip install ansible --quiet
|
run: pip3 install ansible --quiet --break-system-packages
|
||||||
|
|
||||||
- name: Syntax check
|
- name: Syntax check
|
||||||
run: ansible-playbook playbooks/deploy.yml --syntax-check -i inventory/
|
run: ansible-playbook playbooks/deploy.yml --syntax-check -i inventory/
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
needs: syntax-check
|
needs: syntax-check
|
||||||
if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' }}
|
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: python:3.12-slim
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
apt-get update -qq && apt-get install -y openssh-client --no-install-recommends
|
pip3 install ansible --quiet --break-system-packages
|
||||||
pip install ansible --quiet
|
|
||||||
ansible-galaxy collection install ansible.posix community.general community.docker --quiet
|
ansible-galaxy collection install ansible.posix community.general community.docker --quiet
|
||||||
|
|
||||||
- name: Configure SSH
|
- name: Configure SSH
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Generated by Ansible — do not edit manually
|
# Generated by Ansible — do not edit manually
|
||||||
log:
|
log:
|
||||||
level: info
|
level: debug
|
||||||
|
|
||||||
runner:
|
runner:
|
||||||
capacity: 2
|
capacity: 2
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue