From a65e24ac2b86e5af6f68e749539f832a10cbfca2 Mon Sep 17 00:00:00 2001 From: Paramtamtam <7326800+tarampampam@users.noreply.github.com> Date: Sat, 1 Feb 2025 23:45:48 +0400 Subject: [PATCH] cange file locations, replace index files generator for github pages --- .github/workflows/release.yml | 17 +++++++---------- .github/workflows/tests.yml | 6 +++--- {chart => deployments/helm}/Chart.yaml | 4 ++-- {chart => deployments/helm}/README.md | 0 .../helm}/templates/_helpers.tpl | 0 .../helm}/templates/deployment.yaml | 0 .../helm}/templates/ingress.yaml | 0 .../helm}/templates/service.yaml | 0 {chart => deployments/helm}/values.schema.json | 0 {chart => deployments/helm}/values.yaml | 0 10 files changed, 12 insertions(+), 15 deletions(-) rename {chart => deployments/helm}/Chart.yaml (73%) rename {chart => deployments/helm}/README.md (100%) rename {chart => deployments/helm}/templates/_helpers.tpl (100%) rename {chart => deployments/helm}/templates/deployment.yaml (100%) rename {chart => deployments/helm}/templates/ingress.yaml (100%) rename {chart => deployments/helm}/templates/service.yaml (100%) rename {chart => deployments/helm}/values.schema.json (100%) rename {chart => deployments/helm}/values.yaml (100%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f1aadba3..074feff8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -124,7 +124,7 @@ jobs: helm-pack: name: Pack the Helm chart runs-on: ubuntu-latest - defaults: {run: {working-directory: ./chart}} + defaults: {run: {working-directory: ./deployments/helm}} steps: - uses: actions/checkout@v4 - uses: azure/setup-helm@v4 @@ -136,7 +136,7 @@ jobs: - uses: actions/upload-artifact@v4 with: name: helm-chart - path: ./chart/*.tgz + path: ./deployments/helm/*.tgz if-no-files-found: error retention-days: 1 @@ -147,10 +147,6 @@ jobs: steps: - {uses: actions/checkout@v4, with: {ref: gh-pages}} - uses: azure/setup-helm@v4 - - name: Configure git - run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor }}@users.noreply.github.com" - uses: actions/download-artifact@v4 with: {name: helm-chart, path: ./helm-charts} - name: Update the index.yaml @@ -160,12 +156,13 @@ jobs: --merge \ ./helm-charts/index.yaml \ ./helm-charts - - name: Update the index.html - run: tree -H '.' --noreport --dirsfirst -T 'Index' --charset utf-8 -P "*.tgz" -o ./index.html + - uses: yKicchan/generate-directory-listing-action@v1 + with: {target: ., override: true} - name: Commit and push the changes run: | - git add 'helm-charts/*' index.html - git commit -m "Helm chart release" + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" + git commit -am "Helm chart release" git push origin gh-pages deploy-on-render: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3bec3123..ff9b543a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,14 +41,14 @@ jobs: backend: ['api/**', 'cmd/**', 'internal/**', '*go*', 'web/**/*.go'] frontend: ['api/**', 'web/**'] docker: [Dockerfile, '*docker*'] - helm: ['chart/**', '*kube*'] + helm: ['deployments/helm/**', '*kube*'] lint-charts: name: Lint the chart runs-on: ubuntu-latest needs: [filter] if: needs.filter.outputs.helm == 'true' - defaults: {run: {working-directory: ./chart}} + defaults: {run: {working-directory: ./deployments/helm}} steps: - uses: actions/checkout@v4 - uses: azure/setup-helm@v4 @@ -167,7 +167,7 @@ jobs: name: Build the docker image runs-on: ubuntu-latest needs: [filter] - if: needs.filter.outputs.docker == 'true' + if: ${{ needs.filter.outputs.docker == 'true' || needs.filter.outputs.backend == 'true' }} steps: - uses: actions/checkout@v4 - uses: docker/build-push-action@v6 diff --git a/chart/Chart.yaml b/deployments/helm/Chart.yaml similarity index 73% rename from chart/Chart.yaml rename to deployments/helm/Chart.yaml index b506e5f9..a689cd39 100644 --- a/chart/Chart.yaml +++ b/deployments/helm/Chart.yaml @@ -5,7 +5,7 @@ name: webhook-tester description: Powerful tool for testing WebHooks and more type: application -version: 0.1.0 -appVersion: 2.0.1 +version: 0.0.0 # will be replaced by the release workflow +appVersion: 0.0.0 # will be replaced by the release workflow icon: https://github.com/user-attachments/assets/e2e659dc-7fb1-4ac2-ad3c-883899f5fc38 sources: [https://github.com/tarampampam/webhook-tester] diff --git a/chart/README.md b/deployments/helm/README.md similarity index 100% rename from chart/README.md rename to deployments/helm/README.md diff --git a/chart/templates/_helpers.tpl b/deployments/helm/templates/_helpers.tpl similarity index 100% rename from chart/templates/_helpers.tpl rename to deployments/helm/templates/_helpers.tpl diff --git a/chart/templates/deployment.yaml b/deployments/helm/templates/deployment.yaml similarity index 100% rename from chart/templates/deployment.yaml rename to deployments/helm/templates/deployment.yaml diff --git a/chart/templates/ingress.yaml b/deployments/helm/templates/ingress.yaml similarity index 100% rename from chart/templates/ingress.yaml rename to deployments/helm/templates/ingress.yaml diff --git a/chart/templates/service.yaml b/deployments/helm/templates/service.yaml similarity index 100% rename from chart/templates/service.yaml rename to deployments/helm/templates/service.yaml diff --git a/chart/values.schema.json b/deployments/helm/values.schema.json similarity index 100% rename from chart/values.schema.json rename to deployments/helm/values.schema.json diff --git a/chart/values.yaml b/deployments/helm/values.yaml similarity index 100% rename from chart/values.yaml rename to deployments/helm/values.yaml