Skip to content

Rewrite action as a composite action #83

Rewrite action as a composite action

Rewrite action as a composite action #83

Workflow file for this run

name: Continuous Integration
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
test:
name: Tests
runs-on: ubuntu-latest
steps:
# cloning into "root" does not work when trying to call the action from itself
# inspired by Microsoft: https://github.com/microsoft/action-python/blob/c8ec939994d7ed2ec77b7bbe59ed5f5b72fb5607/.github/workflows/test.yml#L21
- name: Checkout
uses: actions/checkout@v4
with:
path: action
clean: true
- name: Run test server
run: |
docker compose build
docker compose up &
- name: Add SSH identity of test server to known hosts
run: |
mkdir -p ~/.ssh
ssh-keyscan -t rsa -p 2222 127.0.0.1 >> ~/.ssh/known_hosts
- name: Test
uses: ./action
with:
compose-file: docker-compose.test.yml
stack-name: david
ssh-user-at-host: [email protected]
ssh-port: 2222