Skip to content

Commit 899f173

Browse files
wip
1 parent ad6fcb3 commit 899f173

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

.github/workflows/nightly-chart-and-image-publish.yaml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
name: Build and Publish nightly Helm chart and Docker images
22

33
on:
4-
schedule:
5-
- cron: "0 0 * * *" # Run every day at midnight (UTC)
4+
workflow_dispatch:
65

76
env:
8-
TAG: ${{ github.ref_name }}
7+
TAG: ${{ github.sha }}
98
REGISTRY: ghcr.io
10-
PROD_REGISTRY: ghcr.io
11-
12-
permissions: {
13-
packages: read|write
14-
}
159

1610
jobs:
1711
build:
@@ -35,16 +29,20 @@ jobs:
3529
username: ${{ github.actor }}
3630
password: ${{ secrets.GITHUB_TOKEN }}
3731
- 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 }}
3933
- 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 }}
4135

4236
release-helm:
4337
name: Release Helm chart
38+
# needs:
39+
# - build
40+
permissions:
41+
contents: read
42+
packages: write
4443
env:
4544
HELM_EXPERIMENTAL_OCI: 1
4645
runs-on: ubuntu-latest
47-
if: github.repository_owner == 'rancher-turtles'
4846
steps:
4947
- name: Checkout code
5048
uses: actions/checkout@v2
@@ -57,7 +55,7 @@ jobs:
5755
version: 3.8.0
5856

5957
- name: Build Helm chart
60-
run: make release-chart
58+
run: make release-chart RELEASE_TAG=v0.0.0-${{ github.sha }}
6159

6260
- name: Login to ghcr.io using Helm
6361
run: |
@@ -67,4 +65,4 @@ jobs:
6765
env:
6866
GHCR_REPOSITORY: ${{ github.repository_owner }}/rancher-turtles-chart
6967
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

0 commit comments

Comments
 (0)