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/exec
|
||||
- name: Semantic Release (dry-run)
|
||||
id: sem_rel
|
||||
run: |
|
||||
npx semantic-release \
|
||||
--package @semantic-release/exec \
|
||||
@ -32,10 +33,9 @@ jobs:
|
||||
# --verifyReleaseCmd 'echo "$${nextRelease.version}" > .version'
|
||||
env:
|
||||
GIT_CREDENTIALS: djpbessems:${{ secrets.GIT_APIKEY }}
|
||||
# - name: Set output variable
|
||||
# id: sem_rel
|
||||
# run: |
|
||||
# echo "version=$(cat .version)" >> $GITHUB_OUTPUT
|
||||
- name: Assert semantic release output
|
||||
run: |
|
||||
[[ -z "${{ steps.sem_rel.outputs.version }}" ]] && (echo 'No release tag - exiting'; exit 1) || exit 0
|
||||
|
||||
Container image:
|
||||
container: catthehacker/ubuntu:act-latest
|
||||
@ -52,3 +52,32 @@ jobs:
|
||||
username: ${{ secrets.GIT_USERNAME }}
|
||||
password: ${{ secrets.GIT_APIKEY }}
|
||||
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…
Reference in New Issue
Block a user