Create docker-image.yml

This commit is contained in:
Fred Liang 2021-09-25 18:40:36 +08:00 committed by GitHub
parent 47416c3ba2
commit d1aaffc7c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

34
.github/workflows/docker-image.yml vendored Normal file
View file

@ -0,0 +1,34 @@
name: Docker Image
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v1
with:
registry: docker.pkg.github.com
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to DockerHub Registry
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
docker.pkg.github.com/fredliang44/derper-docker/derper:latest
fredliang/derper:latest