Release latest Docker image every dev release (#3747)

This commit is contained in:
Bert Blommers 2021-08-28 11:05:19 +01:00 committed by GitHub
parent 1a42b33781
commit b43dc777fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -285,6 +285,19 @@ jobs:
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Build Docker release
run: |
docker build -t motoserver/moto . --tag moto:latest
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
push: true
tags: motoserver/moto:latest
- name: Get version number
run: |
version=$(grep -oP '(?<=__version__ = ")[0-9.a-z]+(?=")' moto/__init__.py)