-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 1.81 KB
/
docker.release.yaml
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
59
60
61
62
63
64
name: Build and release Docker images
on:
push:
branches-ignore:
- '**'
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Determine latest version
id: latest_version
uses: flownative/action-git-latest-release@v1
- run: |
sudo chmod -R ugo+rwX . && shopt -s dotglob && rm -rf *
- uses: actions/checkout@v4
with:
ref: ${{ steps.latest_version.outputs.tag }}
fetch-depth: 100
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
flavor: |
latest=true
images: |
docker.io/flownative/action-helm-release
labels: |
org.opencontainers.image.version=${{ steps.latest_version.outputs.version }}
tags: |
type=semver,pattern={{major}},value=${{ steps.latest_version.outputs.version }}
type=semver,pattern={{major}}.{{minor}},value=${{ steps.latest_version.outputs.version }}
type=semver,pattern={{version}},value=${{ steps.latest_version.outputs.version }}
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKER_IO_REGISTRY_USER }}
password: ${{ secrets.DOCKER_IO_REGISTRY_PASSWORD }}
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}