Release version 0.22.11 #86
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |