forked from karmada-io/karmada
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.22 KB
/
dockerhub-latest-chart.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
name: latest chart to DockerHub
on:
push:
branches:
- master
permissions: read-all
jobs:
publish-chart-to-dockerhub:
name: publish to DockerHub
# prevent job running from forked repository, otherwise
# 1. running on the forked repository would fail as missing necessary secret.
# 2. running on the forked repository would use unnecessary GitHub Action time.
if: ${{ github.repository == 'karmada-io/karmada' && github.ref == 'refs/heads/master' }}
runs-on: ubuntu-22.04
steps:
- name: checkout code
uses: actions/checkout@v4
with:
# fetch-depth:
# 0 indicates all history for all branches and tags.
# for `git describe --tags` in Makefile.
fetch-depth: 0
- name: install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER_NAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: package chart
env:
VERSION: 0.0.0
run: make package-chart
- name: push chart
env:
VERSION: 0.0.0
run: make push-chart