chore: Assert semantic release output
This commit is contained in:
parent
1400b18dff
commit
091b6baf9d
@ -18,6 +18,7 @@ jobs:
|
|||||||
@semantic-release/commit-analyzer \
|
@semantic-release/commit-analyzer \
|
||||||
@semantic-release/exec
|
@semantic-release/exec
|
||||||
- name: Semantic Release (dry-run)
|
- name: Semantic Release (dry-run)
|
||||||
|
id: sem_rel
|
||||||
run: |
|
run: |
|
||||||
npx semantic-release \
|
npx semantic-release \
|
||||||
--package @semantic-release/exec \
|
--package @semantic-release/exec \
|
||||||
@ -32,10 +33,9 @@ jobs:
|
|||||||
# --verifyReleaseCmd 'echo "$${nextRelease.version}" > .version'
|
# --verifyReleaseCmd 'echo "$${nextRelease.version}" > .version'
|
||||||
env:
|
env:
|
||||||
GIT_CREDENTIALS: djpbessems:${{ secrets.GIT_APIKEY }}
|
GIT_CREDENTIALS: djpbessems:${{ secrets.GIT_APIKEY }}
|
||||||
# - name: Set output variable
|
- name: Assert semantic release output
|
||||||
# id: sem_rel
|
run: |
|
||||||
# run: |
|
[[ -z "${{ steps.sem_rel.outputs.version }}" ]] && (echo 'No release tag - exiting'; exit 1) || exit 0
|
||||||
# echo "version=$(cat .version)" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
Container image:
|
Container image:
|
||||||
container: catthehacker/ubuntu:act-latest
|
container: catthehacker/ubuntu:act-latest
|
||||||
@ -52,3 +52,32 @@ jobs:
|
|||||||
username: ${{ secrets.GIT_USERNAME }}
|
username: ${{ secrets.GIT_USERNAME }}
|
||||||
password: ${{ secrets.GIT_APIKEY }}
|
password: ${{ secrets.GIT_APIKEY }}
|
||||||
tag: ${{ steps.sem_rel.outputs.version }}
|
tag: ${{ steps.sem_rel.outputs.version }}
|
||||||
|
|
||||||
|
Helm chart:
|
||||||
|
container: alpine/helm
|
||||||
|
runs-on: dind-rootless
|
||||||
|
needs: Semantic Release (Dry-run)
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Inject semantic release version
|
||||||
|
run: |
|
||||||
|
sed -i 's/{{ chart_version }}/'${{ steps.sem_rel.outputs.version }}'/g' charts/spamasaurusrex/Chart.yaml
|
||||||
|
sed -i 's/{{ image_tag }}/'${{ steps.sem_rel.outputs.version }}'/g' charts/spamasaurusrex/values.yaml
|
||||||
|
- name: Package helm chart into archive
|
||||||
|
run: |
|
||||||
|
helm package ./charts/spamasaurusrex
|
||||||
|
- name: Install helm plugin
|
||||||
|
run: |
|
||||||
|
helm plugin install https://github.com/chartmuseum/helm-push
|
||||||
|
- name: Add target helm repository
|
||||||
|
run: |
|
||||||
|
helm repo add \
|
||||||
|
--username $GIT_USERNAME \
|
||||||
|
--password $GIT_APIKEY \
|
||||||
|
spamasaurus \
|
||||||
|
https://code.spamasaurus.com/api/packages/$GIT_USERNAME/helm
|
||||||
|
- name: Push helm chart
|
||||||
|
run: |
|
||||||
|
helm cm-push \
|
||||||
|
spamasaurusrex-*.tgz \
|
||||||
|
spamasaurus
|
||||||
|
Loading…
x
Reference in New Issue
Block a user