Skip to content

Commit

Permalink
fix docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
sliu008 committed Jan 13, 2025
1 parent 9c05ee8 commit 8c0cbeb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
version: ${{ steps.versioning.outputs.new_version }}
changes: ${{ steps.check_changes.outputs.changes }}
pyproject_name: ${{ steps.versioning.outputs.pyproject_name }}

publish_version: ${{ steps.check_publish.outputs.publish_version }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -166,9 +166,11 @@ jobs:
github.ref == 'refs/heads/develop' ||
github.ref == 'refs/heads/main' ||
startsWith(github.ref, 'refs/heads/release/')
id: check_publish
run: |
FILE=$(ls dist/*.whl dist/*.tar.gz | head -n 1)
PUBLISHED_VERSION=$(basename "$FILE" | sed -E 's/^.*-([0-9]+\.[0-9]+\.[0-9a-zA-Z]+(\.[0-9]+)?)-.*$/\1/')
echo "publish_version=${PUBLISHED_VERSION}" >> $GITHUB_OUTPUT
PYPROJECT_NAME=$(poetry version | awk '{print $1}')
pip install tenacity logging
python3 ${GITHUB_WORKSPACE}/.github/workflows/wait-for-pypi.py $PYPROJECT_NAME==$PUBLISHED_VERSION
Expand Down Expand Up @@ -245,7 +247,7 @@ jobs:
id: set-source
run: |
# Default build source for standard branches
echo "SOURCE=${{ env.pyproject_name }}==${{ env.new_version }}" >> $GITHUB_ENV
echo "SOURCE=${{ ${{ needs.build.outputs.pyproject_name }} }}==${{ ${{ needs.build.outputs.publish_version }} }}" >> $GITHUB_ENV
# Override source if deploying (find .whl file in dist/)
if [[ "${{ contains(github.event.head_commit.message, '/deploy sit') ||
Expand Down

0 comments on commit 8c0cbeb

Please sign in to comment.