Specify compose file name defaulting to compose.yaml
This commit is contained in:
parent
97cee79bb9
commit
ec4194b0a9
@ -9,6 +9,10 @@ inputs:
|
||||
description: 'The SSH key to use for authentication'
|
||||
default: ${{ secrets.BRANCH_DEPLOY_KEY }}
|
||||
required: true
|
||||
compose-file:
|
||||
description: 'The Docker Compose file to use'
|
||||
default: 'compose.yaml'
|
||||
required: true
|
||||
outputs:
|
||||
url:
|
||||
description: 'The URL of the deployed branch'
|
||||
|
@ -11,6 +11,7 @@ async function main() {
|
||||
const owner = gitea.context.repo.owner;
|
||||
const serverUrl = gitea.context.serverUrl;
|
||||
const mangledBranchName = branchName.replace(/\//g, '-').replace(/[^a-zA-Z0-9-]/g, '');
|
||||
const composeFile = core.getInput('compose-file', {required: true});
|
||||
|
||||
core.info(`Branch name: ${branchName}`);
|
||||
core.info(`Repository name: ${repositoryName}`);
|
||||
@ -50,7 +51,7 @@ async function main() {
|
||||
await exec.exec('sh', ['-c', `${pipedCommand}`]);
|
||||
|
||||
const deployCommand = `\
|
||||
echo "${serverUrl}/${owner}/${repositoryName}.git ${branchName} ${mangledBranchName}" | \
|
||||
echo "${serverUrl}/${owner}/${repositoryName}.git ${branchName} ${mangledBranchName} ${composeFile}" | \
|
||||
ssh -i ssh_key -o StrictHostKeyChecking=accept-new branch.dsv.su.se`;
|
||||
const deployment = await exec.getExecOutput('sh', ['-c', deployCommand])
|
||||
if (deployment.exitCode != 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user