|
15 | 15 | with: |
16 | 16 | fetch-depth: 0 |
17 | 17 |
|
| 18 | + # We mark any builds on main branch as latest GH release |
| 19 | + # so make sure we don't accidentally use a pre-release tag. |
| 20 | + - name: Fail on semver pre-release chart version |
| 21 | + run: yq .version deployment/helm/Chart.yaml | grep -v '[a-zA-Z-]' |
| 22 | + if: ${{ github.ref_name == 'main' }} |
| 23 | + |
| 24 | + # To reduce resource usage images are built only on tag. |
| 25 | + # To build a new set of images after committing and pushing |
| 26 | + # new changes to GitHub, use: |
| 27 | + # git tag <tag-name> |
| 28 | + # git push --tags |
| 29 | + - name: Fail if image tags don't exist |
| 30 | + run: >- |
| 31 | + curl -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" |
| 32 | + https://ghcr.io/v2/stackhpc/danswer/danswer-backend/tags/list |
| 33 | + | jq .tags |
| 34 | + | grep $( yq .appVersion deployment/helm/Chart.yaml )-$( yq .tagSuffix deployment/helm/values.yaml ) |
| 35 | + && |
| 36 | + curl -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" |
| 37 | + https://ghcr.io/v2/stackhpc/danswer/danswer-web-server/tags/list |
| 38 | + | jq .tags |
| 39 | + | grep $( yq .appVersion deployment/helm/Chart.yaml )-$( yq .tagSuffix deployment/helm/values.yaml ) |
| 40 | +
|
18 | 41 | # Check if current chart version exists in releases already |
19 | 42 | - name: Check for Helm chart version bump |
20 | 43 | id: version_check |
|
41 | 64 | with: |
42 | 65 | fetch-depth: 0 |
43 | 66 |
|
44 | | - # We mark any builds on main branch as latest GH release |
45 | | - # so make sure we don't accidentally use a pre-release tag. |
46 | | - - name: Fail on semver pre-release chart version |
47 | | - run: yq .version deployment/helm/Chart.yaml | grep -v '[a-zA-Z-]' |
48 | | - if: ${{ github.ref_name == 'main' }} |
49 | | - |
50 | | - # To reduce resource usage images are built only on tag. |
51 | | - # To build a new set of images after committing and pushing |
52 | | - # new changes to GitHub, use: |
53 | | - # git tag <tag-name> |
54 | | - # git push --tags |
55 | | - - name: Fail if image tags don't exist |
56 | | - run: >- |
57 | | - curl -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" |
58 | | - https://ghcr.io/v2/stackhpc/danswer/danswer-backend/tags/list |
59 | | - | jq .tags |
60 | | - | grep $( yq .appVersion deployment/helm/Chart.yaml )-$( yq .tagSuffix deployment/helm/values.yaml ) |
61 | | - && |
62 | | - curl -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" |
63 | | - https://ghcr.io/v2/stackhpc/danswer/danswer-web-server/tags/list |
64 | | - | jq .tags |
65 | | - | grep $( yq .appVersion deployment/helm/Chart.yaml )-$( yq .tagSuffix deployment/helm/values.yaml ) |
66 | | -
|
67 | 67 | - name: Configure Git |
68 | 68 | run: | |
69 | 69 | git config user.name "$GITHUB_ACTOR" |
|
0 commit comments