feat: Add pull request workflow with SSH host validation and deployment checks #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-15 | |
- ubuntu-24.04 | |
- windows-2025 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Setup post check known hosts | |
uses: pyTooling/Actions/with-post-step@9ceefdbf5dceae8c441fc393ed82344c7ca8bbdb # v3.1.1 | |
with: | |
main: | | |
# Do nothing | |
exit 0 | |
post: | | |
./post_check.sh | |
- name: Setup SSH key | |
uses: ./ | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
ssh-known-hosts: ${{ secrets.SSH_KNOWN_HOSTS }} | |
log-public-key: false | |
- name: Setup post check known hosts | |
shell: bash | |
run: | | |
./check.sh | |
- name: Install docker (Missing on MacOS) | |
if: runner.os == 'macos' | |
shell: bash | |
run: | | |
brew install docker | |
- name: Deploy over SSH | |
shell: bash | |
env: | |
DOCKER_HOST: ${{ secrets.DOCKER_HOST }} | |
run: | | |
# renovate: datasource=docker depname=traefik/whoami versioning=docker | |
WHOAMI_VERSION="43a68d10b9dfcfc3ffbfe4dd42100dc9aeaf29b3a5636c856337a5940f1b4f1c" # v1.10 | |
docker run --detach --publish-all --name whoami traefik/whoami:"${WHOAMI_VERSION}" | |
docker stop whoami | |
docker rm whoami |