Release v1

This commit is contained in:
Andreas Svanberg 2024-10-31 14:19:49 +01:00
parent 92ee966340
commit e2788b9321

13
dist/index.js vendored

@ -55,17 +55,6 @@ function main() {
core.info(`Branch name: ${branchName}`);
core.info(`Repository name: ${repositoryName}`);
core.setOutput('url', `https://${repositoryName}-${mangledBranchName}.branch.dsv.su.se`);
const issueNumber = gitea.context.issue.number;
core.info(`Issue number: ${issueNumber}`);
core.info(`context.apiUrl: ${gitea.context.apiUrl}`);
core.info('dumping process.env');
Object.keys(process.env).forEach(key => {
let value = process.env[key];
if (key.includes('TOKEN') || key.includes('SECRET') || key.includes('KEY')) {
value = '***';
}
core.info(`process.env[${key}]=${value}`);
});
const api = client.default({
baseUrl: gitea.context.apiUrl,
headers: {
@ -89,8 +78,6 @@ function main() {
const sshKey = core.getInput('ssh-key', { required: true });
core.info(`sshKey: ${sshKey.length}`);
fs.writeFileSync('ssh_key', `${sshKey}\n`, { flag: 'w+', mode: "0600" });
const pipedCommand = `pwd | ls -l`;
yield exec.exec('sh', ['-c', `${pipedCommand}`]);
const deployCommand = `\
echo "${serverUrl}/${owner}/${repositoryName}.git ${branchName} ${mangledBranchName} ${composeFile}" | \
ssh -i ssh_key -o StrictHostKeyChecking=accept-new branch.dsv.su.se`;