mirror of
https://github.com/unraid/api.git
synced 2026-01-06 00:30:22 -06:00
feat: pass env into builder
This commit is contained in:
16
.github/workflows/main.yml
vendored
16
.github/workflows/main.yml
vendored
@@ -65,12 +65,22 @@ jobs:
|
||||
- name: Test inside of the docker container
|
||||
run: |
|
||||
docker run --rm builder npm run coverage
|
||||
- name: Get Git Short Sha and API version
|
||||
id: vars
|
||||
run: |
|
||||
echo "GIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
echo "API_VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_OUTPUT
|
||||
echo "IS_TAGGED=$(git describe --tags --abbrev=0 --exact-match || echo '') >> $GITHUB_OUTPUT
|
||||
echo "::set-output name=API_VERSION::${API_VERSION}"
|
||||
- name: Build inside of the docker container
|
||||
id: build-pack-binary
|
||||
run: |
|
||||
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}"
|
||||
docker run --rm -v ${{ github.workspace }}/api/deploy/release:/app/deploy/release builder npm run build-and-pack
|
||||
with:
|
||||
env:
|
||||
GIT_SHA=${{ steps.vars.outputs.sha_short }}
|
||||
API_VERSION=${{ steps.vars.outputs.API_VERSION }}
|
||||
IS_TAGGED=${{ steps.vars.outputs.IS_TAGGED }}
|
||||
|
||||
- name: Set Hashes
|
||||
id: set-hashes
|
||||
|
||||
Reference in New Issue
Block a user