diff --git a/.github/workflows/docker-cd.yml b/.github/workflows/docker-cd.yml new file mode 100644 index 00000000000..35a1fd34761 --- /dev/null +++ b/.github/workflows/docker-cd.yml @@ -0,0 +1,53 @@ +name: Docker Image CI and CD + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + # https://github.com/docker/setup-buildx-action + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + +## Uncomment the following to inspect buildx build +# +# - name: Inspect builder +# run: | +# echo "Name: ${{ steps.buildx.outputs.name }}" +# echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}" +# echo "Status: ${{ steps.buildx.outputs.status }}" +# echo "Flags: ${{ steps.buildx.outputs.flags }}" +# echo "Platforms: ${{ steps.buildx.outputs.platforms }}" + + # IMPORTANT: The credentials should not be available via the + # Pull request, hence this if condition here. + # github.event_name != 'pull_request' + - name: Login to DockerHub +# if: github.event_name != 'pull_request' + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + # https://github.com/docker/build-push-action + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + context: . + file: ./docker/sysds.Dockerfile + push: true + tags: apache/systemds:nightly + diff --git a/docker/sysds.Dockerfile b/docker/sysds.Dockerfile index c1c71d3c835..c443d57912f 100644 --- a/docker/sysds.Dockerfile +++ b/docker/sysds.Dockerfile @@ -60,7 +60,6 @@ RUN apt-get update -qq \ rm -r target/hadoop-test && \ rm -r target/maven-archiver && \ rm -r target/systemds-** && \ - rm -r docker && \ rm -r docs && \ rm -r src && \ rm -r /usr/lib/mvn && \ @@ -68,6 +67,7 @@ RUN apt-get update -qq \ rm -r pom.xml && \ rm -r ~/.m2 + COPY docker/mountFolder/main.dml /input/main.dml CMD ["systemds", "/input/main.dml"]