-
Notifications
You must be signed in to change notification settings - Fork 186
79 lines (79 loc) · 2.79 KB
/
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Release
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Bump version and push tag
id: tagging
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INITIAL_VERSION: 1.0.0
DEFAULT_BUMP: none
BRANCH_HISTORY: last
- name: "Set up QEMU"
if: steps.tagging.outputs.part
uses: docker/setup-qemu-action@v2
- name: "Set up Docker Buildx"
if: steps.tagging.outputs.part
uses: docker/setup-buildx-action@v2
- name: "Login to DockerHub"
if: steps.tagging.outputs.part
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: "Login to Quay.io"
if: steps.tagging.outputs.part
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_BOT_USERNAME }}
password: ${{ secrets.QUAY_BOT_PASSWORD }}
- name: "Login to ghcr.io"
if: steps.tagging.outputs.part
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "Build and push"
if: steps.tagging.outputs.part
id: docker_build
uses: docker/build-push-action@v4
with:
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/ppc64le,linux/s390x
tags: |
docker.io/kiwigrid/k8s-sidecar:latest
docker.io/kiwigrid/k8s-sidecar:${{ steps.tagging.outputs.tag }}
quay.io/kiwigrid/k8s-sidecar:latest
quay.io/kiwigrid/k8s-sidecar:${{ steps.tagging.outputs.tag }}
ghcr.io/kiwigrid/k8s-sidecar:latest
ghcr.io/kiwigrid/k8s-sidecar:${{ steps.tagging.outputs.tag }}
- name: "Build Changelog"
if: steps.tagging.outputs.part
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: ".github/workflows/release-notes-config.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Create Github Release"
if: steps.tagging.outputs.part
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ steps.tagging.outputs.tag }}
release_name: v${{ steps.tagging.outputs.tag }}
body: ${{ steps.build_changelog.outputs.changelog }}
draft: false
prerelease: false