push to ghcr (#90)

* push to ghcr

* remove travis, add badge
This commit is contained in:
Benny 2021-12-27 09:48:46 +08:00 committed by GitHub
parent 35c9990e9e
commit b75bcf35d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 44 deletions

View File

@ -33,13 +33,31 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Lower case for ghcr
id: ghcr_string
uses: ASzc/change-string-case-action@v1
with:
string: ${{ github.event.repository.full_name }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/arm,linux/amd64,linux/arm64
push: true
tags: webpsh/webp-server-go
tags: |
webpsh/webp_server_go
webpsh/webp-server-go
webpsh/webps
ghcr.io/${{ steps.ghcr_string.outputs.lowercase }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

View File

@ -3,7 +3,7 @@ on:
tags:
- '*'
name: Release WebP Server Go Binaries
name: Release Binaries
jobs:
build:

View File

@ -1,40 +0,0 @@
language: go
go:
- 1.15.4
- 1.16.x
env: GO111MODULE=on
arch:
- amd64
- arm64
os:
- windows
- osx
- linux
script: sh scripts/build.sh $TRAVIS_OS_NAME $TRAVIS_CPU_ARCH
jobs:
include:
- stage: "Unit Tests"
arch:
- amd64
os:
- linux
script:
- make test
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file_glob: true
file: builds/*
skip_cleanup: true
on:
repo: webp-sh/webp_server_go
tags: true
branch: master
after_success:
- bash <(curl -s https://codecov.io/bash)

View File

@ -1,8 +1,10 @@
<p align="center">
<img src="./pics/webp_server.png"/>
</p>
<img src="https://api.travis-ci.org/webp-sh/webp_server_go.svg?branch=master"/>
[![CI](https://github.com/webp-sh/webp_server_go/actions/workflows/CI.yaml/badge.svg)](https://github.com/webp-sh/webp_server_go/actions/workflows/CI.yaml)
[![build docker image](https://github.com/webp-sh/webp_server_go/actions/workflows/builder.yaml/badge.svg)](https://github.com/webp-sh/webp_server_go/actions/workflows/builder.yaml)
[![Release WebP Server Go Binaries](https://github.com/webp-sh/webp_server_go/actions/workflows/release.yaml/badge.svg)](https://github.com/webp-sh/webp_server_go/actions/workflows/release.yaml)
[![codecov](https://codecov.io/gh/webp-sh/webp_server_go/branch/master/graph/badge.svg?token=VR3BMZME65)](https://codecov.io/gh/webp-sh/webp_server_go)
[Documentation](https://docs.webp.sh/) | [Website](https://webp.sh/)