Change CI name #21
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 OSX | |
on: | |
push: | |
branches: | |
- '*' | |
- '!main' | |
tags: | |
- '*' | |
env: | |
DOCKERFILE: Dockerfile-py3-osx | |
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: ${{ secrets.DOCKERHUB_USERNAME }}/pyinstaller-osx | |
- 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 }}" | |
${{ secrets.DOCKERHUB_USERNAME }}/pyinstaller-osx:latest | |
labels: ${{ steps.meta.outputs.labels }} |