Initial commit
This commit is contained in:
commit
995a69ebdc
8
Dockerfile
Normal file
8
Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
# Container image that runs your code
|
||||
FROM git.abackstrom.com/containers/deploy
|
||||
|
||||
# Copies your code file from your action repository to the filesystem path `/` of the container
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
# Code file to execute when the docker container starts up (`entrypoint.sh`)
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
17
action.yml
Normal file
17
action.yml
Normal file
@ -0,0 +1,17 @@
|
||||
# action.yml
|
||||
name: 'Sixohthree Deploy'
|
||||
description: 'Private deploy pipeline'
|
||||
inputs:
|
||||
local_path:
|
||||
description: 'Local path'
|
||||
required: false
|
||||
default: './'
|
||||
deploy_path:
|
||||
description: 'Deploy path'
|
||||
required: true
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
args:
|
||||
- ${{ inputs.local_path }}
|
||||
- ${{ inputs.deploy_path }}
|
8
entrypoint.sh
Executable file
8
entrypoint.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh -l
|
||||
|
||||
LOCAL_PATH="$1"
|
||||
REMOTE_PATH="$2"
|
||||
|
||||
echo rsync -hrz --delete -C --exclude=".*" -e ssh "$LOCAL_PATH" "deploy.sixohthree.com:/tmp/gitea_${GITEA_RUN_NUMBER}_${GITEA_SHA}"
|
||||
echo ssh deploy.sixohthree.com "dsh -M -c -r ssh -g webs -- rsync -hvrz --delete -C -e ssh deploy.sixohthree.com:/tmp/gitea_${GITEA_RUN_NUMBER}_${GITEA_SHA}/ $REMOTE_PATH"
|
||||
echo ssh deploy.sixohthree.com "rm -rf /tmp/gitea_${GITEA_RUN_NUMBER}_${GITEA_SHA}"
|
Loading…
Reference in New Issue
Block a user