update deploy compose
This commit is contained in:
19
.github/workflows/deploy_compose.yml
vendored
19
.github/workflows/deploy_compose.yml
vendored
@@ -9,14 +9,6 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: ${{ github.repository }}
|
default: ${{ github.repository }}
|
||||||
checkout_token:
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
default: ${{ github.token }}
|
|
||||||
ssh_proxy_cmd:
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
default: ''
|
|
||||||
stack_file_name:
|
stack_file_name:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
@@ -41,17 +33,18 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
repository: ${{ inputs.compose_repository }}
|
repository: ${{ inputs.compose_repository }}
|
||||||
token: ${{ inputs.checkout_token }}
|
token: ${{ secrets.REPOS_ACCESS_TOKEN }}
|
||||||
|
|
||||||
- name: Switch Host if pr
|
- name: Switch Host if pr
|
||||||
id: meta
|
id: meta
|
||||||
run: |
|
run: |
|
||||||
echo "Set Host"
|
echo "Set Host"
|
||||||
echo "github.event_name: ${{ github.event_name}}"
|
echo "github.event_name: ${{ github.event_name}}"
|
||||||
echo DEPLOY_HOST=$([ "${{ github.event_name}}" == "pull_request" ] && echo -n "${{ vars.DEV_DEPLOY_HOST }}" || echo -n "${{ vars.DEPLOY_HOST }}") >> $GITHUB_OUTPUT
|
echo DEPLOY_HOST=$([ "${{ github.event_name}}" == "pull_request" ] && echo -n "${{ secrets.DEV_DEPLOY_HOST }}" || echo -n "${{ secrets.DEPLOY_HOST }}") >> $GITHUB_OUTPUT
|
||||||
echo DEPLOY_USER=$([ "${{ github.event_name}}" == "pull_request" ] && echo -n "${{ vars.DEV_DEPLOY_USER }}" || echo -n "${{ vars.DEPLOY_USER }}") >> $GITHUB_OUTPUT
|
echo DEPLOY_USER=$([ "${{ github.event_name}}" == "pull_request" ] && echo -n "${{ secrets.DEV_DEPLOY_USER }}" || echo -n "${{ secrets.DEPLOY_USER }}") >> $GITHUB_OUTPUT
|
||||||
echo SSH_PRIVATE_KEY=$([ "${{ github.event_name}}" == "pull_request" ] && echo -n "${{ secrets.DEV_SSH_PRIVATE_KEY }}" || echo -n "${{ secrets.SSH_PRIVATE_KEY }}") >> $GITHUB_OUTPUT
|
echo SSH_PRIVATE_KEY=$([ "${{ github.event_name}}" == "pull_request" ] && echo -n "${{ secrets.DEV_SSH_PRIVATE_KEY }}" || echo -n "${{ secrets.SSH_PRIVATE_KEY }}") >> $GITHUB_OUTPUT
|
||||||
echo WORKING_DIRECTORY=$([ "${{ github.event_name}}" == "pull_request" ] && echo -n "${{ vars.DEV_WORKING_DIRECTORY }}" || echo -n "${{ vars.WORKING_DIRECTORY }}") >> $GITHUB_OUTPUT
|
echo SSH_PROXY_CMD=$([ "${{ github.event_name}}" == "pull_request" ] && echo -n "${{ secrets.DEV_SSH_PROXY_CMD }}" || echo -n "${{ secrets.SSH_PROXY_CMD }}") >> $GITHUB_OUTPUT
|
||||||
|
echo WORKING_DIRECTORY=$([ "${{ github.event_name}}" == "pull_request" ] && echo -n "${{ secrets.DEV_WORKING_DIRECTORY }}" || echo -n "${{ secrets.WORKING_DIRECTORY }}") >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Change Version if pr
|
- name: Change Version if pr
|
||||||
if: ${{ github.event.pull_request }}
|
if: ${{ github.event.pull_request }}
|
||||||
@@ -67,8 +60,8 @@ jobs:
|
|||||||
remote_docker_host: ${{ steps.meta.outputs.DEPLOY_HOST }}
|
remote_docker_host: ${{ steps.meta.outputs.DEPLOY_HOST }}
|
||||||
remote_docker_user: ${{ steps.meta.outputs.DEPLOY_USER }}
|
remote_docker_user: ${{ steps.meta.outputs.DEPLOY_USER }}
|
||||||
ssh_private_key: ${{ steps.meta.outputs.SSH_PRIVATE_KEY }}
|
ssh_private_key: ${{ steps.meta.outputs.SSH_PRIVATE_KEY }}
|
||||||
|
ssh_proxy_cmd: ${{ steps.meta.outputs.SSH_PROXY_CMD }}
|
||||||
deploy_path: ${{ steps.meta.outputs.WORKING_DIRECTORY }}
|
deploy_path: ${{ steps.meta.outputs.WORKING_DIRECTORY }}
|
||||||
ssh_proxy_cmd: ${{ inputs.ssh_proxy_cmd }}
|
|
||||||
stack_file_name: ${{ inputs.stack_file_name }}
|
stack_file_name: ${{ inputs.stack_file_name }}
|
||||||
env_file_name: ${{ inputs.env_file_name }}
|
env_file_name: ${{ inputs.env_file_name }}
|
||||||
args: ${{ inputs.args }}
|
args: ${{ inputs.args }}
|
||||||
|
|||||||
Reference in New Issue
Block a user