update binary version, increase sleep and rewrite readme based on branch #158
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy | |
on: | |
push: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get branch name | |
id: git | |
run: | | |
NAME=$(echo ${GITHUB_REF} | sed -e "s/.*\///g") | |
TAG=false | |
if [[ ${GITHUB_REF} == *"/tags/"* ]]; then | |
TAG=true | |
fi | |
echo name=${NAME} tag=${TAG} ref=${GITHUB_REF} | |
echo "::set-output name=name::${NAME}" | |
echo "::set-output name=tag::${TAG}" | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
with: | |
platforms: amd64,arm64,arm,386 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1.10.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CR_PAT }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
platforms: linux/amd64,linux/arm64,linux/arm/v7 | |
push: true | |
tags: | | |
${{ github.repository }}:${{ steps.git.outputs.name }} | |
ghcr.io/${{ github.repository }}:${{ steps.git.outputs.name }} | |
- name: Push latest | |
uses: docker/build-push-action@v2 | |
if: steps.git.outputs.tag == 'true' | |
with: | |
platforms: linux/amd64,linux/arm64,linux/arm/v7 | |
push: true | |
tags: | | |
${{ github.repository }}:latest | |
ghcr.io/${{ github.repository }}:latest | |
- name: Update repo description | |
uses: peter-evans/dockerhub-description@v2 | |
if: steps.git.outputs.tag == 'true' | |
with: | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
repository: ${{ github.repository }} |