Skip to content

Commit

Permalink
Add workflow to publish TF models
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel A. Cabrera Minagorri <devgorri@gmail.com>
  • Loading branch information
miguelaeh committed Aug 29, 2023
1 parent 1ee8195 commit a4cca5a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
#push:
# tags:
# TODO: we should split the cli and the core containers, if not, the release lifecycle is a mess
# if not, we have to release using the core version but after the cli is published.
# - 'core-v*'
workflow_dispatch:
branches:
Expand All @@ -16,19 +17,19 @@ jobs:
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: miguelaeh/pipeless

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
Expand All @@ -37,4 +38,3 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

25 changes: 25 additions & 0 deletions .github/workflows/publish-tf-models-to-pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish TF models to Pypi
on:
push:
tags:
- "tf-models-v*.*.*"
jobs:
publish-cli:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10.12'
- name: Get Poetry
uses: abatilo/actions-poetry@v2.1.6
with:
poetry-version: '1.5.1'
- name: Publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
cd models/tensorflow
poetry config repositories.pypi https://upload.pypi.org/legacy/
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --repository pypi --build

0 comments on commit a4cca5a

Please sign in to comment.