From a0b2e7a1aed7671d12cea9eadec794fb9bd8b18f Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Fri, 9 Jul 2021 23:50:41 +0200 Subject: [PATCH] Update main.js --- main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 1354093..3589243 100644 --- a/main.js +++ b/main.js @@ -30,7 +30,7 @@ async function main() { try { const sourceRelativeDirectory = core.getInput("source_directory") || "./" const artifactsRelativeDirectory = core.getInput("artifacts_directory") || "./" - const os_distribution = core.getInput("os_distribution") || "" + const osDistribution = core.getInput("os_distribution") || "" const workspaceDirectory = process.cwd() const sourceDirectory = path.join(workspaceDirectory, sourceRelativeDirectory) @@ -39,10 +39,10 @@ async function main() { const file = path.join(sourceDirectory, "debian/changelog") const changelog = await firstline(file) - const regex = /^(?.+) \(((?[0-9]+):)?(?[^:-]+)(-(?[^:-]+))?\) (?.+);/ + const regex = /^(?.+) \(((?[0-9]+):)?(?[^:-]+)(-(?[^:-]+))?\) (?.+);/ const match = changelog.match(regex) - const { pkg, epoch, version, revision, package_distribution } = match.groups - const distribution = os_distribution ? os_distribution : package_distribution + const { pkg, epoch, version, revision, packageDistribution } = match.groups + const distribution = osDistribution ? osDistribution : packageDistribution const imageName = await getImageName(distribution) const imageTag = await getImageTag(imageName, distribution) const container = pkg