2020-11-14 15:44:10 +00:00
|
|
|
name: docker
|
2020-11-14 15:28:50 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
tags:
|
2021-04-04 19:00:21 +00:00
|
|
|
- 'v*'
|
2020-11-14 15:28:50 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
main:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Docker meta
|
2021-04-04 19:00:21 +00:00
|
|
|
id: meta
|
2021-05-04 08:02:19 +00:00
|
|
|
uses: crazy-max/ghaction-docker-meta@v2.4.0
|
2020-11-14 15:28:50 +00:00
|
|
|
with:
|
|
|
|
images: distribyted/distribyted
|
2021-04-04 19:00:21 +00:00
|
|
|
tags: |
|
|
|
|
type=ref,event=branch
|
|
|
|
type=ref,event=pr
|
|
|
|
type=semver,pattern={{version}}
|
|
|
|
type=semver,pattern={{major}}.{{minor}}
|
2020-11-14 15:28:50 +00:00
|
|
|
|
|
|
|
- name: Set up QEMU
|
2021-05-23 17:00:00 +00:00
|
|
|
uses: docker/setup-qemu-action@v1.1.0
|
2020-11-14 15:28:50 +00:00
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
|
|
|
|
- name: Login to DockerHub
|
2021-04-29 16:40:35 +00:00
|
|
|
uses: docker/login-action@v1.9.0
|
2020-11-14 15:28:50 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Build and push
|
|
|
|
id: docker_build
|
2021-07-05 07:17:24 +00:00
|
|
|
uses: docker/build-push-action@v2.6.1
|
2020-11-14 15:28:50 +00:00
|
|
|
with:
|
2021-04-04 19:00:21 +00:00
|
|
|
context: .
|
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
2020-11-14 15:48:14 +00:00
|
|
|
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
2020-11-14 15:44:10 +00:00
|
|
|
|
|
|
|
- name: Update repo description
|
2021-05-23 16:59:09 +00:00
|
|
|
uses: peter-evans/dockerhub-description@v2.4.2
|
2020-11-14 15:44:10 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
|
repository: distribyted/distribyted
|