Skip to content

Commit

Permalink
Add name for manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
gingerhot committed Apr 5, 2021
1 parent 4a47aa9 commit e1dbc8f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: TabHub Card Action
uses: tabhub/tabhub-card-action@v1
uses: tabhub/tabhub-card-action@master
- name: Git commit
run: |
# git commit if there's any change
if test -n "$(git status --porcelain 2>/dev/null)"; then
git config --global user.email "idegorepl@gmail.com"
git config --global user.name "ActionCloud Bot"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "Update manifest"
git push
Expand Down
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ function walkDirs(dirPath) {
const imageList = readImageDir(imageDir);
if (imageList) {
const imageManifest = toImageManifest(imageList, dirPath);
console.log(`manifest: ${imageManifest}`);
dumpData(imageManifest, path.join(dirPath, "manifest.json"));
}
return;
Expand All @@ -342,7 +343,7 @@ function toImageManifest(imageList, dirPath) {
})
});
return {
name: "",
name: `${repo}/${dirPath}`,
version: "1.0",
repo: `https://github.com/${repo}/tree/${gitRef}/${dirPath}`,
type: "resource",
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ function walkDirs(dirPath) {
const imageList = readImageDir(imageDir);
if (imageList) {
const imageManifest = toImageManifest(imageList, dirPath);
console.log(`manifest: ${imageManifest}`);
dumpData(imageManifest, path.join(dirPath, "manifest.json"));
}
return;
Expand All @@ -52,7 +53,7 @@ function toImageManifest(imageList, dirPath) {
})
});
return {
name: "",
name: `${repo}/${dirPath}`,
version: "1.0",
repo: `https://github.com/${repo}/tree/${gitRef}/${dirPath}`,
type: "resource",
Expand Down

0 comments on commit e1dbc8f

Please sign in to comment.