Added pre commit hook (#24) #68
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: CI WINDOWS | |
on: | |
push: | |
branches: | |
- '*' | |
- '!main' | |
- '!feature*' | |
- '!fix*' | |
tags: | |
- '*' | |
env: | |
DOCKERFILE: Dockerfile-py3-windows | |
IMAGE_NAME: batonogov/pyinstaller-windows | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Run Tests | |
run: | | |
echo "Building image to test" | |
./build-and-test.sh ${{ env.DOCKERFILE }} | |
build_and_push_to_registry: | |
needs: test | |
name: Push Docker image to Docker Hub | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | |
with: | |
images: ${{ env.IMAGE_NAME }} | |
- name: Build and push Docker image (branch) | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: ${{ env.DOCKERFILE }} | |
push: true | |
tags: | | |
${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Build and push Docker image (release) | |
if: ${{ startsWith(github.ref, 'refs/tags/*') }} | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
platforms: | | |
linux/amd64 | |
file: ${{ env.DOCKERFILE }} | |
push: true | |
tags: | | |
${{ github.ref_name }}" | |
${{ env.IMAGE_NAME }}:latest | |
labels: ${{ steps.meta.outputs.labels }} |