diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..be3c0af --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,59 @@ +name: Build and publish + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: prepare build environment + run: | + sudo apt-get update + sudo apt-get install -y \ + gcc \ + g++ \ + make \ + libsqlite3-dev \ + libmariadb-dev-compat \ + autoconf \ + libtool \ + golang \ + ca-certificates + shell: bash + - name: build + run: make -C src USE_EXPEREMENTAL_DISCORD=true + shell: bash + + docker_image_publish: + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + steps: + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }}} + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Docker meta + id: meta + uses: docker/metadata-action@v3 + with: + images: | + vasyahuyasa/remod + ghcr.io/vasyahuyasa/remod + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9f75526..0000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: cpp -os: - - linux -compiler: - - gcc -sudo: false -services: docker -env: - global: - - IMAGE_NAME=vasyahuyasa/remod - -install: - - sudo apt-get update - - sudo apt-get install -y automake build-essential zlib1g-dev - - eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.15 bash)" - -script: - - cd src && make && make clean - -before_deploy: - - docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD - - cd .. - - docker build --pull --cache-from "$IMAGE_NAME:latest" --tag "${IMAGE_NAME}:${TRAVIS_TAG}" . - - docker tag "${IMAGE_NAME}:${TRAVIS_TAG}" "${IMAGE_NAME}:latest" - -deploy: - provider: script - script: docker push "${IMAGE_NAME}:latest" && docker push "${IMAGE_NAME}:${TRAVIS_TAG}" - on: - tags: true \ No newline at end of file diff --git a/GeoLite2-Country.mmdb b/GeoLite2-Country.mmdb index e7183fd..1836799 100644 Binary files a/GeoLite2-Country.mmdb and b/GeoLite2-Country.mmdb differ