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
|
2022-03-07 10:28:29 +00:00
|
|
|
uses: actions/checkout@v3
|
2020-11-14 15:28:50 +00:00
|
|
|
|
|
|
|
- name: Docker meta
|
2021-04-04 19:00:21 +00:00
|
|
|
id: meta
|
2022-10-08 16:31:02 +00:00
|
|
|
uses: crazy-max/ghaction-docker-meta@v4.0.1
|
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
|
2023-02-14 11:10:48 +00:00
|
|
|
uses: docker/setup-qemu-action@v2.1.0
|
2020-11-14 15:28:50 +00:00
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
2022-10-08 16:30:32 +00:00
|
|
|
uses: docker/setup-buildx-action@v2
|
2020-11-14 15:28:50 +00:00
|
|
|
|
|
|
|
- name: Login to DockerHub
|
2023-02-14 11:12:01 +00:00
|
|
|
uses: docker/login-action@v2.1.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-10-10 09:10:37 +00:00
|
|
|
uses: docker/build-push-action@v3.1.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
|
2022-03-31 10:18:47 +00:00
|
|
|
uses: peter-evans/dockerhub-description@v3
|
2020-11-14 15:44:10 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
|
repository: distribyted/distribyted
|