mirror of
https://github.com/redhat-actions/buildah-build.git
synced 2025-04-20 17:11:23 +00:00
fix issue when finding language-image file
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
This commit is contained in:
parent
3043388d5b
commit
2168b4e067
6 changed files with 15 additions and 5 deletions
|
@ -1 +1,8 @@
|
||||||
In testing
|
# buildah
|
||||||
|
|
||||||
|
Buildah is a GitHub Action for building OCI-compatible (Docker- and Kubernetes-compatible) images quickly and easily.
|
||||||
|
|
||||||
|
Buildah action works only on Linux distributions, and it is not supported on Windows or Mac platforms at this time.
|
||||||
|
|
||||||
|
Note that GitHub's [Ubuntu Environments](https://github.com/actions/virtual-environments#available-environments) (ubuntu-20.04 and ubuntu-18.04) come with buildah 1.17.0 installed. So, if you are not using those Ubuntu environments you need to make sure to install buildah tool in an early step.
|
||||||
|
|
||||||
|
|
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
3
dist/language-image.json
vendored
Normal file
3
dist/language-image.json
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"java": "docker.io/fabric8/java-alpine-openjdk11-jre"
|
||||||
|
}
|
|
@ -100,7 +100,7 @@ function getSuggestedBaseImage(languages) {
|
||||||
function getBaseImageByLanguage(language) {
|
function getBaseImageByLanguage(language) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
const rawData = yield fs_1.promises.readFile(path.join(__dirname, 'language-image.json'), 'utf-8');
|
const rawData = yield fs_1.promises.readFile(path.join(__dirname, '..', 'language-image.json'), 'utf-8');
|
||||||
const languageImageJSON = JSON.parse(rawData);
|
const languageImageJSON = JSON.parse(rawData);
|
||||||
return languageImageJSON[language.name];
|
return languageImageJSON[language.name];
|
||||||
});
|
});
|
||||||
|
|
|
@ -97,7 +97,7 @@ async function getSuggestedBaseImage(languages: Language[]): Promise<string> {
|
||||||
|
|
||||||
async function getBaseImageByLanguage(language: Language): Promise<string> {
|
async function getBaseImageByLanguage(language: Language): Promise<string> {
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
const rawData = await fs.readFile(path.join(__dirname, 'language-image.json'), 'utf-8');
|
const rawData = await fs.readFile(path.join(__dirname, '..', 'language-image.json'), 'utf-8');
|
||||||
const languageImageJSON = JSON.parse(rawData);
|
const languageImageJSON = JSON.parse(rawData);
|
||||||
return languageImageJSON[language.name];
|
return languageImageJSON[language.name];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue