build-qrm-server #56
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-qrm-server | |
on: | |
workflow_dispatch: | |
inputs: | |
version_type: | |
type: choice | |
description: Version type | |
options: | |
- patch | |
- minor | |
- major | |
required: true | |
run_tests: | |
type: boolean | |
description: Run tests | |
default: true | |
jobs: | |
run_tests: | |
if: github.event.inputs.run_tests == 'true' | |
uses: ./.github/workflows/test-server-and-client.yml | |
#coverage: | |
# uses: ./.github/workflows/coverage-report.yml | |
docker: | |
needs: [run_tests] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: prepare env | |
run: | | |
export ACTIONS_RUNNER_PRINT_LOG_TO_STDOUT=true | |
make -f Makefile_qrmserver install_py_req | |
- 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: Stamp with vmn | |
id: vmn_version | |
uses: progovoy/vmn-action@vmna_0.1.8 | |
with: | |
release-mode: ${{ github.event.inputs.version_type }} | |
app-name: qrm_server | |
- name: show version vmn | |
run: | | |
vmn show qrm_server --verbose > ./qrm_server/ver.yaml | |
echo "cat ./qrm_server/ver.yaml" | |
cat ./qrm_server/ver.yaml | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
file: DockerfileQrmServer | |
push: true | |
tags: finalil/qrm_server:${{ steps.vmn_version.outputs.verstr }},finalil/qrm_server:latest |