|
1 | | -# name: Bitween UI CI/CD (Gateway · GHCR OCI) |
2 | | -# run-name: Run-${{ github.ref_name }}-${{ github.run_number }} |
| 1 | +name: Bitween UI CI/CD (Gateway · GHCR OCI) |
| 2 | +run-name: Run-${{ github.ref_name }}-${{ github.run_number }} |
3 | 3 |
|
4 | | -# on: |
5 | | -# push: |
6 | | -# branches: |
7 | | -# - main |
8 | | -# workflow_dispatch: |
| 4 | +on: |
| 5 | + push: |
| 6 | + workflow_dispatch: |
9 | 7 |
|
10 | | -# concurrency: |
11 | | -# group: cicd-gateway-${{ github.workflow }}-${{ github.ref }} |
12 | | -# cancel-in-progress: false |
| 8 | +concurrency: |
| 9 | + group: cicd-gateway-${{ github.workflow }}-${{ github.ref }} |
| 10 | + cancel-in-progress: false |
13 | 11 |
|
14 | | -# # contents: write -> tag job. packages: write -> publish AND pull the Helm chart |
15 | | -# # via GHCR OCI (github-oci). The Docker image is still pushed to Docker Hub. |
16 | | -# permissions: |
17 | | -# security-events: read |
18 | | -# contents: write |
19 | | -# packages: write |
| 12 | +# contents: write -> tag job. packages: write -> publish AND pull the Helm chart |
| 13 | +# via GHCR OCI (github-oci). The Docker image is still pushed to Docker Hub. |
| 14 | +permissions: |
| 15 | + security-events: read |
| 16 | + contents: write |
| 17 | + packages: write |
20 | 18 |
|
21 | | -# jobs: |
22 | | -# build-publish-deploy: |
23 | | -# if: ${{ (github.event_name == 'push' && github.ref_name == 'main') || |
24 | | -# github.event_name == 'workflow_dispatch' }} |
25 | | -# uses: simplify9/.github/.github/workflows/reusable-service-cicd.yml@main |
26 | | -# with: |
27 | | -# major-version: '8' |
28 | | -# minor-version: '1' |
29 | | -# dockerfile-path: './Dockerfile' |
30 | | -# docker-context: '.' |
31 | | -# docker-platforms: 'linux/amd64' |
| 19 | +jobs: |
| 20 | + build-publish-deploy: |
| 21 | + if: ${{ (github.event_name == 'push' && github.ref_name == 'main') || |
| 22 | + github.event_name == 'workflow_dispatch' }} |
| 23 | + uses: simplify9/.github/.github/workflows/reusable-service-cicd.yml@main |
| 24 | + with: |
| 25 | + major-version: '8' |
| 26 | + minor-version: '1' |
| 27 | + dockerfile-path: './Dockerfile' |
| 28 | + docker-context: '.' |
| 29 | + docker-platforms: 'linux/amd64' |
32 | 30 |
|
33 | | -# chart-name: 'bitweenui' # must match Chart.yaml name: |
34 | | -# chart-path: './chart' |
| 31 | + chart-name: 'bitweenui' # must match Chart.yaml name: |
| 32 | + chart-path: './chart' |
35 | 33 |
|
36 | | -# # 1) Publish the Helm chart to BOTH GHCR OCI and ChartMuseum |
37 | | -# chart-publish-method: 'both' |
38 | | -# chart-repo-url: 'https://charts.sf9.io' # ChartMuseum target (required for 'both') |
| 34 | + # 1) Publish the Helm chart to BOTH GHCR OCI and ChartMuseum |
| 35 | + chart-publish-method: 'both' |
| 36 | + chart-repo-url: 'https://charts.sf9.io' # ChartMuseum target (required for 'both') |
39 | 37 |
|
40 | | -# # Docker image is still published to Docker Hub |
41 | | -# container-registry: 'docker.io' |
42 | | -# image-name: 'simplify9/bitweenui' |
| 38 | + # Docker image is still published to Docker Hub |
| 39 | + container-registry: 'docker.io' |
| 40 | + image-name: 'simplify9/bitweenui' |
43 | 41 |
|
44 | | -# # 2) Deploy to the cluster using Gateway API |
45 | | -# deploy: true |
46 | | -# # 3) Pull the chart from GHCR OCI (the default source for 'both') |
47 | | -# deploy-chart-source: 'github-oci' |
48 | | -# deploy-namespace: 'playground' |
49 | | -# routing-mode: 'gateway-api' |
50 | | -# gateway-hostnames: 'app-dev.bitween.io' |
51 | | -# gateway-paths: '/' |
52 | | -# # app-dev.bitween.io is not *.sf9.io, so the deploy auto-onboards a |
53 | | -# # dedicated listener + cert-manager Certificate on the parent gateway. |
54 | | -# # Parent gateway / class / issuer use the standard defaults |
55 | | -# # (public-gateway · s9-dev-edge · cilium · letsencrypt-production-gateway). |
56 | | -# secrets: |
57 | | -# # Docker image push credentials (Docker Hub) |
58 | | -# registry-username: ${{ secrets.DOCKERHUB_USERNAME }} |
59 | | -# registry-password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 42 | + # 2) Deploy to the cluster using Gateway API |
| 43 | + deploy: true |
| 44 | + # 3) Pull the chart from GHCR OCI (the default source for 'both') |
| 45 | + deploy-chart-source: 'github-oci' |
| 46 | + deploy-namespace: 'playground' |
| 47 | + routing-mode: 'gateway-api' |
| 48 | + gateway-hostnames: 'app-dev.bitween.io' |
| 49 | + gateway-paths: '/' |
| 50 | + # app-dev.bitween.io is not *.sf9.io, so the deploy auto-onboards a |
| 51 | + # dedicated listener + cert-manager Certificate on the parent gateway. |
| 52 | + # Parent gateway / class / issuer use the standard defaults |
| 53 | + # (public-gateway · s9-dev-edge · cilium · letsencrypt-production-gateway). |
| 54 | + secrets: |
| 55 | + # Docker image push credentials (Docker Hub) |
| 56 | + registry-username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 57 | + registry-password: ${{ secrets.DOCKERHUB_TOKEN }} |
60 | 58 |
|
61 | | -# # GHCR chart push + pull and git tagging use the built-in token |
62 | | -# github-token: ${{ secrets.GITHUB_TOKEN }} |
| 59 | + # GHCR chart push + pull and git tagging use the built-in token |
| 60 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
63 | 61 |
|
64 | | -# # ChartMuseum credentials (required because chart-publish-method is 'both') |
65 | | -# chartmuseum-username: ${{ secrets.CM_USER }} |
66 | | -# chartmuseum-password: ${{ secrets.CM_PASSWORD }} |
| 62 | + # ChartMuseum credentials (required because chart-publish-method is 'both') |
| 63 | + chartmuseum-username: ${{ secrets.CM_USER }} |
| 64 | + chartmuseum-password: ${{ secrets.CM_PASSWORD }} |
67 | 65 |
|
68 | | -# # Gateway-API cluster kubeconfig (V2) |
69 | | -# kubeconfig-gateway: ${{ secrets.S9DEV_KUBECONFIG_V2 }} |
70 | | -# dependabot-alerts-token: ${{ secrets.DEPENDABOT_ALERTS_TOKEN }} |
| 66 | + # Gateway-API cluster kubeconfig (V2) |
| 67 | + kubeconfig-gateway: ${{ secrets.S9DEV_KUBECONFIG_V2 }} |
| 68 | + dependabot-alerts-token: ${{ secrets.DEPENDABOT_ALERTS_TOKEN }} |
0 commit comments