Skip to content

Commit

Permalink
fix(ci): align build version handling between tox and GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
soufianerafik committed Jan 16, 2025
1 parent 2b9a26e commit dbd6509
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,14 @@ jobs:
poetry run pip install tox uw-it-build-fingerprinter
- name: Build and test
env:
HUSKY_DIRECTORY_VERSION: ${{ env.version }}
run: |
poetry run tox -e build-layers -- -t ${{ env.version }} --release ${{ env.version }} --cache --build-arg HUSKY_DIRECTORY_VERSION=${{ env.version }}
poetry run tox -e unit-tests
poetry run tox -e build-layers -- \
-t ${{ env.version }} \
--release ${{ env.version }} \
--cache
poetry run tox -e unit-tests
- name: Create release ${{ needs.configure-release.outputs.version }}
uses: ncipollo/release-action@v1
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ commands = black husky_directory tests


[testenv:build-layers]
commands = bash -c "set -x; $(fingerprinter -o build-script) -t tox {posargs} --build-arg HUSKY_DIRECTORY_VERSION=$(poetry version -s)"

passenv = HUSKY_DIRECTORY_VERSION
commands = bash -c "set -x; $(fingerprinter -o build-script) -t tox {posargs} --build-arg HUSKY_DIRECTORY_VERSION={env:HUSKY_DIRECTORY_VERSION:$(poetry version -s)}"

[testenv:flake8]
deps = flake8
Expand Down

0 comments on commit dbd6509

Please sign in to comment.