-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.63 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
name: Manage lifecycle Helm Release Cleaner
env:
USER: devopsiaci
REPO: helm-release-cleaner
on:
push:
branches:
- main
jobs:
release:
name: Build Helm Release Cleaner
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run Semantic Release
uses: cycjimmy/semantic-release-action@v4
id: semantic
with:
branches: |
[
'main'
]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to Docker Hub
if: ${{ steps.semantic.outputs.new_release_published == 'true' }}
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push Docker image
if: ${{ steps.semantic.outputs.new_release_published == 'true' }}
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
env:
VERSION: ${{ steps.semantic.outputs.new_release_version }}
with:
context: .
push: true
tags: |
${{ env.USER }}/${{ env.REPO }}:${{ env.VERSION }}
${{ env.USER }}/${{ env.REPO }}:latest
- name: Update Docker registry description
if: ${{ steps.semantic.outputs.new_release_published == 'true' }}
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: ${{ env.USER }}/${{ env.REPO }}