-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (56 loc) · 1.7 KB
/
docker_publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Docker Publish
on:
release:
types:
- published
# push:
# tags:
# - releases/v?[1-9]+.[0-9]+.[0-9]+
# branches:
# - main
jobs:
docker-publish:
name: Publish to Docker Hub
# if: startsWith( github.ref, 'refs/tags/releases/')
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Get version tag
id: version_tag
run: |
[[ ! "$GITHUB_REF" =~ refs/tags ]] && exit
echo "::set-output name=value::${GITHUB_REF#refs/tags/}"
# - name: Bump version
# uses: remorses/bump-version@js
# id: version
# with:
# version_file: ./VERSION
# github_token: ${{ secrets.GITHUB_TOKEN }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Checkout code
# uses: actions/[email protected]
# with:
# ref: main
- name: Set up QEMU
uses: docker/[email protected]
with:
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push
uses: docker/[email protected]
with:
context: .
push: true
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
tags: |
maxirus/meshcommander:latest
maxirus/meshcommander:${{ github.event.release.tag_name }}
labels: "version=${{ github.event.release.tag_name }}"