forked from eatvio/eatvio-infra
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
name: "infra 0.0.0.1"
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main-ci
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
name: Test
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Add the SSH key to known_hosts
|
|
env:
|
|
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
|
run: |
|
|
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
|
|
mkdir -p ~/.ssh
|
|
ssh-add - <<< "${{ vars.SSH_PRIVATE_KEY }}" || true
|
|
ssh-keyscan -p 222 10.55.5.123 >> ~/.ssh/known_hosts || true
|
|
chmod 644 ~/.ssh/known_hosts || true
|
|
chmod 700 ~/.ssh || true
|
|
|
|
- name: init containers
|
|
env:
|
|
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y apt-transport-https ca-certificates curl software-properties-common docker.io
|
|
curl -L "https://github.com/docker/compose/releases/download/v2.17.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
|
chmod +x /usr/local/bin/docker-compose
|
|
docker-compose --version
|
|
make init
|
|
|
|
- name: run CI
|
|
run: make ci
|
|
|