Skip to content

Supprime utilisateur et le fichier vps #68

Supprime utilisateur et le fichier vps

Supprime utilisateur et le fichier vps #68

Workflow file for this run

name: "Continuous Integration"
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
env:
ECLIPSE_SSH_HOST: 51.91.16.19
ECLIPSE_SSH_USER: debian
EQUINOXE_SSH_HOST: 5.135.137.147
EQUINOXE_SSH_USER: debian
jobs:
install:
name: Install Python requirements
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
- name: Cache Python dependencies
uses: actions/cache@v3
id: python-dependencies
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-dependencies-${{ hashFiles('**/requirements.txt') }}
- name: Install dependencies
run: pip install -r requirements.txt
lint:
name: Lint ansible files
runs-on: ubuntu-20.04
needs: [install]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
- name: Cache Python dependencies
uses: actions/cache@v3
id: python-dependencies
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-dependencies-${{ hashFiles('**/requirements.txt') }}
- name: Check installed package
run: pip freeze
- name: Run ansible lint
run: ansible-lint --offline
deployment:
name: Continuous deployment
runs-on: ubuntu-20.04
needs: [install, lint]
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
- name: Cache Python dependencies
uses: actions/cache@v3
id: python-dependencies
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-dependencies-${{ hashFiles('**/requirements.txt') }}
- name: Eclipse Deployment
shell: bash
run: |
mkdir -p ~/.ssh/
echo "${{ secrets.ECLIPSE_PRIVATE_KEY }}" > ~/.ssh/eclipse
chmod 600 ~/.ssh/eclipse
ssh -o StrictHostKeyChecking=no ${{ env.ECLIPSE_SSH_USER }}@${{ env.ECLIPSE_SSH_HOST }} -i ~/.ssh/eclipse
- name: Equinoxe Deployment
shell: bash
run: |
mkdir -p ~/.ssh/
echo "${{ secrets.EQUINOXE_PRIVATE_KEY }}" > ~/.ssh/equinoxe
chmod 600 ~/.ssh/equinoxe
ssh -o StrictHostKeyChecking=no ${{ env.EQUINOXE_SSH_USER }}@${{ env.EQUINOXE_SSH_HOST }} -i ~/.ssh/equinoxe