Unverified Commit cb77724f authored by Martin Ruskov's avatar Martin Ruskov Committed by GitHub
Browse files

Feature/macosx (#44)



* Docker image for MacOSX

* Delete .github/workflows directory

* reinstantiated workflows; added one for OSX

* trying to work out env variables

* trying to work out env variables (take 2)

* resolving pip/pipx confusion

* g

---------

Co-authored-by: default avatarFedor Batonogov <f.batonogov@yandex.ru>
parent 39ad1962
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@ on:

env:
  DOCKERFILE: Dockerfile-py3-linux
  IMAGE_NAME: batonogov/pyinstaller-linux

jobs:
  test:
@@ -41,7 +40,7 @@ jobs:
        id: meta
        uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
        with:
          images: ${{ env.IMAGE_NAME }}
          images: ${{ secrets.DOCKERHUB_USERNAME }}/pyinstaller-linux

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
@@ -72,5 +71,5 @@ jobs:
          push: true
          tags: |
            ${{ github.ref_name }}"
            ${{ env.IMAGE_NAME }}:latest
            ${{ secrets.DOCKERHUB_USERNAME }}/pyinstaller-linux:latest
          labels: ${{ steps.meta.outputs.labels }}
+67 −0
Original line number Diff line number Diff line
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 }}
+2 −3
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@ on:

env:
  DOCKERFILE: Dockerfile-py3-windows
  IMAGE_NAME: batonogov/pyinstaller-windows

jobs:
  test:
@@ -41,7 +40,7 @@ jobs:
        id: meta
        uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
        with:
          images: ${{ env.IMAGE_NAME }}
          images: ${{ secrets.DOCKERHUB_USERNAME }}/pyinstaller-windows

      - name: Build and push Docker image (branch)
        uses: docker/build-push-action@v3
@@ -64,5 +63,5 @@ jobs:
          push: true
          tags: |
            ${{ github.ref_name }}"
            ${{ env.IMAGE_NAME }}:latest
            ${{ secrets.DOCKERHUB_USERNAME }}/pyinstaller-windows:latest
          labels: ${{ steps.meta.outputs.labels }}
+3 −1
Original line number Diff line number Diff line
@@ -14,7 +14,9 @@ USER root

RUN pacman --noconfirm -Sy python-pipx

RUN pipx ensurepath && pipx install pyinstaller==$PYINSTALLER_VERSION \
RUN pipx ensurepath \
    && pipx install pip \
    && pipx install pyinstaller==$PYINSTALLER_VERSION \
    && chmod +x /entrypoint.sh

VOLUME /src/
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ fi
cd $WORKDIR

if [ -f requirements.txt ]; then
    pipx install -r requirements.txt
    pip install -r requirements.txt
fi # [ -f requirements.txt ]

echo "$@"