chore: Refactor job id's and names to support output variables
Some checks failed
Container & Helm chart / Semantic Release (Dry-run) (push) Successful in 37s
Container & Helm chart / Helm chart (push) Failing after 15s
Container & Helm chart / Container image (push) Successful in 1m8s

This commit is contained in:
Danny Bessems 2024-02-28 10:30:10 +11:00
parent f592d75764
commit 56bd49735e

View File

@ -2,8 +2,11 @@ name: Container & Helm chart
on: [push]
jobs:
Semantic Release (Dry-run):
semrel_dryrun:
name: Semantic Release (Dry-run)
runs-on: dind-rootless
outputs:
version: ${{ steps.sem_rel.outputs.version }}
steps:
- name: Check out repository code
uses: actions/checkout@v3
@ -40,10 +43,11 @@ jobs:
echo 'Release tag set correctly: ${{ steps.sem_rel.outputs.version }}'; exit 0
}
Container image:
build_container:
name: Container image
container: catthehacker/ubuntu:act-latest
runs-on: dind
needs: Semantic Release (Dry-run)
needs: semrel_dryrun
steps:
- name: Checkout
uses: actions/checkout@v4
@ -54,19 +58,20 @@ jobs:
image: djpbessems/spamasaurusrex
username: ${{ secrets.GIT_USERNAME }}
password: ${{ secrets.GIT_APIKEY }}
tag: ${{ needs.sem_rel.outputs.version }}
tag: ${{ needs.semrel_dryrun.outputs.version }}
Helm chart:
build_chart:
name: Helm chart
runs-on: dind-rootless
needs: Semantic Release (Dry-run)
needs: semrel_dryrun
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Inject semantic release version
run: |
sed -i 's/{{ chart_version }}/'${{ needs.sem_rel.outputs.version }}'/g' charts/spamasaurusrex/Chart.yaml
sed -i 's/{{ image_tag }}/'${{ needs.sem_rel.outputs.version }}'/g' charts/spamasaurusrex/values.yaml
sed -i 's/{{ chart_version }}/'${{ needs.semrel_dryrun.outputs.version }}'/g' charts/spamasaurusrex/Chart.yaml
sed -i 's/{{ image_tag }}/'${{ needs.semrel_dryrun.outputs.version }}'/g' charts/spamasaurusrex/values.yaml
- name: Install helm w/ plugins
run: |
curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | tee /usr/share/keyrings/helm.gpg > /dev/null