File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change 1
1
name : Build and Publish nightly Helm chart and Docker images
2
2
3
3
on :
4
- schedule :
5
- - cron : " 0 0 * * *" # Run every day at midnight (UTC)
4
+ workflow_dispatch :
6
5
7
6
env :
8
- TAG : ${{ github.ref_name }}
7
+ TAG : ${{ github.sha }}
9
8
REGISTRY : ghcr.io
10
- PROD_REGISTRY : ghcr.io
11
-
12
- permissions : {
13
- packages : read|write
14
- }
15
9
16
10
jobs :
17
11
build :
@@ -35,16 +29,20 @@ jobs:
35
29
username : ${{ github.actor }}
36
30
password : ${{ secrets.GITHUB_TOKEN }}
37
31
- name : Build docker image
38
- run : make docker-build-all TAG=${{ env.TAG }}
32
+ run : ORG=alexander-demicev make docker-build-all TAG=${{ env.TAG }}
39
33
- name : Push docker image
40
- run : make docker-push-all TAG=${{ env.TAG }} PROD_REGISTRY=${{ env.REGISTRY }}
34
+ run : ORG=alexander-demicev make docker-push-all TAG=${{ env.TAG }}
41
35
42
36
release-helm :
43
37
name : Release Helm chart
38
+ # needs:
39
+ # - build
40
+ permissions :
41
+ contents : read
42
+ packages : write
44
43
env :
45
44
HELM_EXPERIMENTAL_OCI : 1
46
45
runs-on : ubuntu-latest
47
- if : github.repository_owner == 'rancher-turtles'
48
46
steps :
49
47
- name : Checkout code
50
48
uses : actions/checkout@v2
57
55
version : 3.8.0
58
56
59
57
- name : Build Helm chart
60
- run : make release-chart
58
+ run : make release-chart RELEASE_TAG=v0.0.0-${{ github.sha }}
61
59
62
60
- name : Login to ghcr.io using Helm
63
61
run : |
67
65
env :
68
66
GHCR_REPOSITORY : ${{ github.repository_owner }}/rancher-turtles-chart
69
67
run : |
70
- helm push out/package/rancher-turtles-0.0.0. tgz oci://ghcr.io/${GHCR_REPOSITORY }/rancher-turtles-chart
68
+ helm push out/package/rancher-turtles-0.0.0-${{ github.sha }}. tgz oci://ghcr.io/${{ github.repository_owner } }/rancher-turtles-chart
You can’t perform that action at this time.
0 commit comments