Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93b93397c2 | ||
|
|
3103d1465d | ||
|
|
0b9f9c4786 | ||
|
|
3b9f4f25f0 |
2
.github/workflows/publish-docker.yml
vendored
2
.github/workflows/publish-docker.yml
vendored
@@ -38,4 +38,4 @@ jobs:
|
|||||||
MAJOR_VERSION=$(echo $VERSION | sed -n "s/^\([0-9]*\).[0-9]*.[0-9]*$/\1/p")
|
MAJOR_VERSION=$(echo $VERSION | sed -n "s/^\([0-9]*\).[0-9]*.[0-9]*$/\1/p")
|
||||||
[[ ${#MAJOR_VERSION} -gt 0 ]] && docker tag $IMAGE_NAME $IMAGE_NAME:$MAJOR_VERSION
|
[[ ${#MAJOR_VERSION} -gt 0 ]] && docker tag $IMAGE_NAME $IMAGE_NAME:$MAJOR_VERSION
|
||||||
|
|
||||||
docker push $IMAGE_NAME
|
docker push $IMAGE_NAME --all-tags
|
||||||
|
|||||||
7
dist/index.js
vendored
7
dist/index.js
vendored
@@ -212,6 +212,11 @@ const inputHelper = __importStar(__nccwpck_require__(5480));
|
|||||||
const dockerhubHelper = __importStar(__nccwpck_require__(1812));
|
const dockerhubHelper = __importStar(__nccwpck_require__(1812));
|
||||||
const fs = __importStar(__nccwpck_require__(7147));
|
const fs = __importStar(__nccwpck_require__(7147));
|
||||||
const util_1 = __nccwpck_require__(3837);
|
const util_1 = __nccwpck_require__(3837);
|
||||||
|
function getErrorMessage(error) {
|
||||||
|
if (error instanceof Error)
|
||||||
|
return error.message;
|
||||||
|
return String(error);
|
||||||
|
}
|
||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
@@ -232,7 +237,7 @@ function run() {
|
|||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.debug((0, util_1.inspect)(error));
|
core.debug((0, util_1.inspect)(error));
|
||||||
core.setFailed(error.message);
|
core.setFailed(getErrorMessage(error));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ import * as dockerhubHelper from './dockerhub-helper'
|
|||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
import {inspect} from 'util'
|
import {inspect} from 'util'
|
||||||
|
|
||||||
|
function getErrorMessage(error: unknown) {
|
||||||
|
if (error instanceof Error) return error.message
|
||||||
|
return String(error)
|
||||||
|
}
|
||||||
|
|
||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const inputs = inputHelper.getInputs()
|
const inputs = inputHelper.getInputs()
|
||||||
@@ -31,9 +36,9 @@ async function run(): Promise<void> {
|
|||||||
readmeContent
|
readmeContent
|
||||||
)
|
)
|
||||||
core.info('Request successful')
|
core.info('Request successful')
|
||||||
} catch (error: any) {
|
} catch (error) {
|
||||||
core.debug(inspect(error))
|
core.debug(inspect(error))
|
||||||
core.setFailed(error.message)
|
core.setFailed(getErrorMessage(error))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user