Skip to content

Commit

Permalink
ci: docker build every check-in
Browse files Browse the repository at this point in the history
  • Loading branch information
danellecline committed Oct 3, 2024
1 parent d9addb2 commit 8fa5063
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,28 @@ jobs:
with:
fetch-depth: 0

- name: Check release status
id: release-status
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install python-semantic-release
if semantic-release --noop --strict version
then
echo "Releasing new version."
else
echo "Skipping release steps."
fi
- name: Python Semantic Release
id: semantic
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: docker push version
if: steps.release.outputs.released == 'true'
run: |
export RELEASE_VERSION=$(echo ${{ steps.release-status.outputs.tag }} | cut -c 2-)
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }}
docker buildx create --name mybuilder --platform linux/amd64,linux/arm64 --use
docker buildx build --push --platform linux/amd64,linux/arm64 -t mbari/fastapi-yolov5-fargate-elb:$RELEASE_VERSION --label IMAGE_URI=mbari/fastapi-yolov5-fargate-elb:$RELEASE_VERSION -f Dockerfile.aws .
Expand Down

0 comments on commit 8fa5063

Please sign in to comment.