Skip to content

Commit

Permalink
Merge pull request #18 from vladimir-gladkii/main
Browse files Browse the repository at this point in the history
Fixed a bug in creating paths in the Helm Chart repo
  • Loading branch information
vladimir-gladkii authored Feb 26, 2024
2 parents 7ff9905 + 89aade7 commit fa7fb41
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 51 deletions.
26 changes: 6 additions & 20 deletions .github/workflows/build_web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,40 +46,26 @@ jobs:
push: true
tags: ${{ env.DOCKER_IMAGES }}

- name: Create release dir
run: mkdir -p ./release

- name: Package helm chart
run: |
cd ./release
helm package ../charts/app
- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install --no-root --with dev
- name: Generate openapi.yaml
run: poetry run python ./tools/extract_openapi.py app.main:app --app-dir . --out ./release/openapi.yaml --app_version "${{ env.APP_VERSION }}"
run: poetry run python ./tools/extract_openapi.py app.main:app --app-dir . --out ./openapi.yaml --app_version "${{ env.APP_VERSION }}"

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Create a github release
run: gh release create "${{ env.APP_VERSION }}" ./release/*
run: gh release create "${{ env.APP_VERSION }}" ./openapi.yaml
env:
GH_TOKEN: ${{ github.token }}

- name: Generate index.yaml
run: |
chmod +x ./tools/helm_chart_repo.sh
./tools/helm_chart_repo.sh "${{ secrets.HELM_REPO_URL }}"
- name: Publish to github pages
uses: peaceiris/actions-gh-pages@v3
- name: Publish Helm charts
uses: stefanprodan/helm-gh-pages@master
with:
github_token: ${{ github.token }}
publish_dir: .
publish_branch: gh-pages
token: ${{ github.token }}
target_dir: "./charts-repo/"
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,11 @@ Set up secrets at `https://github.com/<workspace>/<project>/settings/secrets/act
10. HELM_REPO_URL - `https://<workspace>.github.io/<project>/`

**After execution**
The OpenAPI schema and the Helm chart will be available at `https://github.com/<workspace>/<project>/releases/`.
The index.yaml file containing the list of Helm charts will be available at `https://<workspace>.github.io/<project>/index.yaml`. You can use URL `https://<workspace>.github.io/<project>/` on https://artifacthub.io/.
The OpenAPI schema will be available at `https://github.com/<workspace>/<project>/releases/`.
The index.yaml file containing the list of Helm charts will be available at `https://<workspace>.github.io/<project>/charts-repo/index.yaml`. You can this URL on https://artifacthub.io/.

### Library
To change the build process for the library, you need to replace the nested workflow ./.github/workflows/build_web.yaml to ./.github/workflows/build_lib.yaml in .github\workflows\test_and_build.yaml:
To change the build process for the library, you need to replace the nested workflow `./.github/workflows/build_web.yaml` to `./.github/workflows/build_lib.yaml` in `.github/workflows/test_and_build.yaml`:
```yaml
build:
needs: [test]
Expand Down
28 changes: 0 additions & 28 deletions tools/helm_chart_repo.sh

This file was deleted.

0 comments on commit fa7fb41

Please sign in to comment.