Skip to content

fix: WANNA_GCP_ENABLE_REMOTE_VALIDATION logic (#98) #31

fix: WANNA_GCP_ENABLE_REMOTE_VALIDATION logic (#98)

fix: WANNA_GCP_ENABLE_REMOTE_VALIDATION logic (#98) #31

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v3
- name: Extract Git Tag
run: echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Build and publish to PYPI
run: |
poetry version ${{ env.GIT_TAG }}
poetry build
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish
- name: Publish docs
run: |
poetry install
poetry run task docs-deploy
docker:
runs-on: ubuntu-latest
environment: production
needs: build
steps:
- uses: actions/checkout@v3
- name: Extract Git Tag
run: echo "GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker Image
uses: docker/build-push-action@v3
with:
push: true
build-args: WANNA_VERSION=${{ env.GIT_TAG }}
file: docker/Dockerfile
tags: michalmrazek9/wanna-ml:${{ env.GIT_TAG }},michalmrazek9/wanna-ml:latest
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
short-description: ${{ github.event.repository.description }}
repository: michalmrazek9/wanna-ml