Merge pull request #2 from ababak/drop_python2 #40
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: Docker Image CI | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
build: | |
runs-on: windows-2019 | |
steps: | |
- name: Check Out Repo | |
uses: actions/checkout@v2 | |
- name: Login to DockerHub | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Set output variables | |
id: vars | |
run: | | |
echo "::set-output name=cgcpp_version::$(python setup.py --version)" | |
echo "::set-output name=docker_tag::$($(python setup.py --version) -replace '\.\w+$')" | |
- name: Build Docker image | |
run: docker build . --file Dockerfile --tag ababak/cgcpp:${{ steps.vars.outputs.docker_tag }} | |
- name: Push | |
run: docker push ababak/cgcpp:${{ steps.vars.outputs.docker_tag }} |