feat: mount git folder to builder

This commit is contained in:
Eli Bosley
2024-10-24 11:15:42 -04:00
parent 406c400bd2
commit 05fa344454
2 changed files with 3 additions and 2 deletions

View File

@@ -68,7 +68,7 @@ jobs:
- name: Build inside of the docker container
id: build-pack-binary
run: |
docker run --rm -v ${{ github.workspace }}/api/deploy/release:/app/deploy/release builder npm run build-and-pack
docker run --rm -v ${{ github.workspace }}/api/deploy/release:/app/deploy/release -v ${{ github.workspace}}/.git:/app/.git builder npm run build-and-pack
API_VERSION=$(cat package.json | jq -r '.version')
echo "::set-output name=API_VERSION::${API_VERSION}"

View File

@@ -22,7 +22,8 @@ const getTags = (env = process.env) => {
const isCommitTagged = runCommand('git describe --tags --abbrev=0 --exact-match') !== undefined;
console.log('gitShortSHA', gitShortSHA, 'isCommitTagged', isCommitTagged);
if (!gitShortSHA) {
throw new Error('Failing build due to missing SHA');
console.error('Failed to get git short SHA');
process.exit(1);
}
return {
shortSha: gitShortSHA,