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
|
2023-09-05 17:50:05 +00:00
|
|
|
uses: actions/checkout@v4
|
2020-11-14 15:28:50 +00:00
|
|
|
|
|
|
|
- name: Docker meta
|
2021-04-04 19:00:21 +00:00
|
|
|
id: meta
|
2023-09-13 08:24:26 +00:00
|
|
|
uses: crazy-max/ghaction-docker-meta@v5.0.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
|
2023-09-13 08:23:39 +00:00
|
|
|
uses: docker/setup-qemu-action@v3.0.0
|
2020-11-14 15:28:50 +00:00
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
2023-09-13 08:23:55 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2020-11-14 15:28:50 +00:00
|
|
|
|
|
|
|
- name: Login to DockerHub
|
2023-09-13 08:24:11 +00:00
|
|
|
uses: docker/login-action@v3.0.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
|
2023-09-13 08:24:39 +00:00
|
|
|
uses: docker/build-push-action@v5.0.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
|
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
|