diff --git a/Dockerfile b/.github/run-mpyl/Dockerfile similarity index 74% rename from Dockerfile rename to .github/run-mpyl/Dockerfile index 8b91a560cc..87cf27a911 100644 --- a/Dockerfile +++ b/.github/run-mpyl/Dockerfile @@ -1,18 +1,8 @@ -# syntax=docker/dockerfile:1 - -# Comments are provided throughout this file to help you get started. -# If you need more help, visit the Dockerfile reference guide at -# https://docs.docker.com/go/dockerfile-reference/ - -# Want to help us make this template better? Share your feedback here: https://forms.gle/ybq9Krt8jtBL3iCk7 - - ARG PYTHON_VERSION=3.9 FROM python:${PYTHON_VERSION}-slim AS base # Prevents Python from writing pyc files. ENV PYTHONDONTWRITEBYTECODE=1 - # Keeps Python from buffering stdout and stderr to avoid situations where # the application crashes without emitting any logs due to buffering. ENV PYTHONUNBUFFERED=1 diff --git a/.github/run-mpyl/action.yaml b/.github/run-mpyl/action.yaml index 6e5c5dcaeb..1c85b9e7b8 100644 --- a/.github/run-mpyl/action.yaml +++ b/.github/run-mpyl/action.yaml @@ -1,12 +1,14 @@ name: mpyl description: Action to run mpyl from a docker container + inputs: mpyl-command: description: The mpyl command to run required: false # set to true later default: build status + runs: - using: 'docker' - image: 'Dockerfile' + using: docker + image: Dockerfile args: - ${{ inputs.mpyl-command }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000000..f64b688548 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,26 @@ +name: test +on: + workflow_dispatch: + push: + + +jobs: + test: + name: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + install: true + + - name: Run mpyl + uses: ./.github/run-mpyl + env: + DOCKER_BUILDKIT: 1 + with: + mpyl-command: build status