diff --git a/.github/workflows/dockerimage-latest.yml b/.github/workflows/dockerimage-latest.yml new file mode 100644 index 0000000..9d7e626 --- /dev/null +++ b/.github/workflows/dockerimage-latest.yml @@ -0,0 +1,17 @@ +name: Docker Image latest + +on: + push: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build the Docker image + run: docker build . --file Dockerfile --tag markusressel/py-image-dedup:latest + - name: Login to DockerHub Registry + run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin + - name: Push the Docker image + run: docker push markusressel/py-image-dedup:latest diff --git a/.github/workflows/dockerimage-release.yml b/.github/workflows/dockerimage-release.yml new file mode 100644 index 0000000..61dd901 --- /dev/null +++ b/.github/workflows/dockerimage-release.yml @@ -0,0 +1,21 @@ +name: Docker Image Release + +on: + push: + tags: + - "*.*.*" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + # this writes the tag name into GIT_TAG_NAME + - name: Get tag name + uses: olegtarasov/get-tag@v2 + - name: Build the Docker image + run: docker build . --file Dockerfile --tag markusressel/py-image-dedup:$GIT_TAG_NAME + - name: Login to DockerHub Registry + run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin + - name: Push the Docker image + run: docker push markusressel/py-image-dedup:$GIT_TAG_NAME diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d654ff6..0000000 --- a/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -language: python - -services: - - docker - -before_install: - # - docker pull elasticsearch:7.5.1 - - docker run -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.5.1 - - docker ps -a - -python: - - "3.7" - - "3.8" - -install: - - pip install --upgrade pip - - pip install pipenv - - pipenv install --system --deploy - - pip install --no-cache-dir . - -script: - - cd tests - - pytest - - cd .. - -before_deploy: - docker build -t markusressel/py-image-dedup . - -deploy: - - provider: script - skip_cleanup: true - script: bash travis/docker_push - on: - branch: master - tags: true - - provider: script - skip_cleanup: true - script: bash travis/docker_push_latest - on: - branch: master - tags: false \ No newline at end of file diff --git a/travis/docker_push b/travis/docker_push deleted file mode 100644 index c2490c1..0000000 --- a/travis/docker_push +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin -docker tag "markusressel/py-image-dedup" "markusressel/py-image-dedup:${TRAVIS_TAG}" -docker push "markusressel/py-image-dedup:${TRAVIS_TAG}" \ No newline at end of file diff --git a/travis/docker_push_latest b/travis/docker_push_latest deleted file mode 100644 index 78c4ba7..0000000 --- a/travis/docker_push_latest +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin -docker push "markusressel/py-image-dedup:latest" \ No newline at end of file