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-12-07 12:17:06 +00:00
|
|
|
uses: crazy-max/ghaction-docker-meta@v3.6.2
|
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-07-05 07:18:56 +00:00
|
|
|
uses: docker/setup-qemu-action@v1.2.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-12-21 09:51:22 +00:00
|
|
|
uses: docker/login-action@v1.12.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
|
2022-01-19 16:50:14 +00:00
|
|
|
uses: docker/build-push-action@v2.8.0
|
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-07-05 07:18:26 +00:00
|
|
|
uses: peter-evans/dockerhub-description@v2.4.3
|
2020-11-14 15:44:10 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
|
repository: distribyted/distribyted
|