mirror of
https://github.com/easingthemes/ssh-deploy.git
synced 2025-06-21 12:02:09 +10:00
start nginx for testing
This commit is contained in:
parent
f7c067b07e
commit
692d3fee7d
6 changed files with 733 additions and 173 deletions
39
.github/workflows/e2e.yml
vendored
39
.github/workflows/e2e.yml
vendored
|
@ -38,19 +38,13 @@ jobs:
|
|||
docker build \
|
||||
-t ssh-host-image . \
|
||||
--build-arg ssh_pub_key="$(cat $HOME/.ssh/id_rsa.pub)" \
|
||||
--build-arg ssh_user="${{ env.TEST_USER }}" \
|
||||
|
||||
- name: Start Host Server Container
|
||||
working-directory: ${{ env.TEST_HOST_DOCKER }}
|
||||
run: |
|
||||
docker run --name ssh-host-container -d ssh-host-image
|
||||
|
||||
- name: Get IP of Host Server
|
||||
run: |
|
||||
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ssh-host-container > ip.txt
|
||||
cat ip.txt
|
||||
EXAMPLE_REMOTE_HOST=$(cat ip.txt)
|
||||
echo "EXAMPLE_REMOTE_HOST=$EXAMPLE_REMOTE_HOST" >> $GITHUB_ENV
|
||||
--build-arg ssh_user="${{ env.TEST_USER }}"
|
||||
docker run -d --name=ssh-host-container ssh-host-image
|
||||
docker exec ssh-host-container sh -c "hostname --ip-address" > ip.txt
|
||||
echo "EXAMPLE_REMOTE_HOST<<EOF" >> $GITHUB_ENV
|
||||
cat ip.txt >> $GITHUB_ENV
|
||||
echo "EOF" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- name: Create project file
|
||||
run: |
|
||||
|
@ -60,14 +54,25 @@ jobs:
|
|||
date +"%Y-%m-%d %H:%M:%S,%3N" >> index.html
|
||||
cat index.html
|
||||
|
||||
- name: e2e Test ssh-deploy action
|
||||
# - name: e2e Test local ssh-deploy action
|
||||
# run: node ./dist/index.js
|
||||
# env:
|
||||
# SSH_PRIVATE_KEY: $EXAMPLE_SSH_PRIVATE_KEY
|
||||
# ARGS: "-rltgoDzvO"
|
||||
# SOURCE: "test_project/"
|
||||
# REMOTE_HOST: $EXAMPLE_REMOTE_HOST
|
||||
# REMOTE_USER: $TEST_USER
|
||||
# TARGET: "/var/www/html/"
|
||||
# EXCLUDE: "/dist/, /node_modules/"
|
||||
|
||||
- name: e2e Test published ssh-deploy action
|
||||
uses: easingthemes/ssh-deploy@main
|
||||
env:
|
||||
SSH_PRIVATE_KEY: env.EXAMPLE_SSH_PRIVATE_KEY
|
||||
SSH_PRIVATE_KEY: $EXAMPLE_SSH_PRIVATE_KEY
|
||||
ARGS: "-rltgoDzvO"
|
||||
SOURCE: "test_project/"
|
||||
REMOTE_HOST: env.EXAMPLE_REMOTE_HOST
|
||||
REMOTE_USER: env.TEST_USER
|
||||
REMOTE_HOST: $EXAMPLE_REMOTE_HOST
|
||||
REMOTE_USER: $TEST_USER
|
||||
TARGET: "/var/www/html/"
|
||||
EXCLUDE: "/dist/, /node_modules/"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue