Skip to content

Release version 0.20.0 #66

Release version 0.20.0

Release version 0.20.0 #66

name: Build and Deploy
on:
push:
branches-ignore: ["*"]
tags: ["*"]
jobs:
deploy:
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'AWeber-Imbi/imbi'
steps:
- name: Check out the repo
uses: actions/checkout@v2
with:
submodules: true
- name: Get the version
id: get_version
run: echo "::set-output name=version::$(tr -d '\n' < api/VERSION)"
shell: bash
- name: Setup API Environment
run: sudo make deploy_setup
shell: bash
- name: Build
run: make dist
- name: Upload to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload api/dist/imbi-${{ steps.get_version.outputs.version }}.tar.gz
shell: bash
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push to hub.docker.com
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: aweber/imbi:${{ steps.get_version.outputs.version }}
context: .
file: ./Dockerfile
build-args: |
VERSION=${{ steps.get_version.outputs.version }}
- name: Tag Latest
run: |
docker pull aweber/imbi:${{ steps.get_version.outputs.version }}
docker tag aweber/imbi:${{ steps.get_version.outputs.version }} aweber/imbi:latest
docker push aweber/imbi:latest