Browse Source

actions: add docker build (#317)

pull/483/head
FireMasterK 1 year ago
committed by GitHub
parent
commit
1a3acd252c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 38
      .github/workflows/build-docker.yml
  2. 19
      .travis.yml

38
.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 }}

19
.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

Loading…
Cancel
Save