From 1a3acd252c28df7539bf4e7549fc232989d76fae Mon Sep 17 00:00:00 2001 From: FireMasterK <20838718+FireMasterK@users.noreply.github.com> Date: Fri, 22 Jan 2021 20:31:10 +0000 Subject: [PATCH] actions: add docker build (#317) --- .github/workflows/build-docker.yml | 38 ++++++++++++++++++++++++++++++ .travis.yml | 19 --------------- 2 files changed, 38 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/build-docker.yml diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml new file mode 100644 index 0000000..96f6b08 --- /dev/null +++ b/.github/workflows/build-docker.yml @@ -0,0 +1,38 @@ +name: Docker Multi-Architecture Build + +on: + push: + paths-ignore: + - "**.md" + branches: + - master + +jobs: + build-docker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + with: + platforms: all + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + with: + version: latest + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: zedeus/nitter:latest,zedeus/nitter:${{ github.sha }} diff --git a/.travis.yml b/.travis.yml index 447585d..5f4a741 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,24 +1,5 @@ jobs: include: - - stage: build - if: (NOT type IN (pull_request)) AND (branch = master) - language: minimal - services: - - docker - script: - - docker build -t $IMAGE_NAME:$TRAVIS_COMMIT . - - echo $DOCKERHUB_PASSWORD | docker login -u $DOCKERHUB_USERNAME --password-stdin - - docker push $IMAGE_NAME:$TRAVIS_COMMIT - - stage: deploy - if: (NOT type IN (pull_request)) AND (branch = master) - language: minimal - services: - - docker - script: - - docker pull $IMAGE_NAME:$TRAVIS_COMMIT - - docker tag $IMAGE_NAME:$TRAVIS_COMMIT $IMAGE_NAME:latest - - echo $DOCKERHUB_PASSWORD | docker login -u $DOCKERHUB_USERNAME --password-stdin - - docker push $IMAGE_NAME:latest - stage: test if: (NOT type IN (pull_request)) AND (branch = master) dist: bionic