Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
5883251
feat: initial commit for use with DNSimple
arnediekmann May 26, 2020
f703e54
doc: add certificate creation to README
arnediekmann May 26, 2020
2724b83
feat: add release script
arnediekmann May 26, 2020
6496c7d
fix: add correct helm path in release script
arnediekmann May 27, 2020
cda293d
chore: Bump version to 0.0.1.
arnediekmann May 27, 2020
a4132d7
fix: fix path to helm dir in release script
arnediekmann May 27, 2020
e1e088b
chore: update deps
arnediekmann May 27, 2020
b85fb0f
chore: update README.md
arnediekmann Jun 2, 2020
3741646
fix: quote account id in staging cluster issuer
arnediekmann Jul 29, 2020
67e2abf
chore: Bump version to 0.0.2.
arnediekmann Jul 29, 2020
81f4c24
docs: add better description for chart
arnediekmann Jul 29, 2020
4a085a8
chore: update helm index in repo that enframes all of our charts
arnediekmann Jul 29, 2020
9ce3e6d
docs: update README to include instructions on how to use our helm repo
arnediekmann Jul 29, 2020
2ed52c8
chore: add more info to Helm chart metadata
arnediekmann Jul 29, 2020
1bb8d33
chore: Bump version to 0.0.3.
arnediekmann Jul 29, 2020
0acec98
fix: explicit pki durations to match resulting objects
cmacrae Aug 25, 2020
6c154de
Merge pull request #5 from cmacrae/compat/gitops_pki_durations
arnediekmann Aug 25, 2020
0bb6900
chore: Bump version to 0.0.4.
arnediekmann Aug 25, 2020
24c78cb
chore: update deps
arnediekmann Dec 9, 2020
c5b7612
chore: change apiVersion to v1
arnediekmann Dec 9, 2020
fc6e021
chore: Bump version to 0.0.5.
arnediekmann Dec 9, 2020
1880524
Fetch account ID from DNSimple API
Jan 19, 2021
3142c58
Add support for using an existing token secret
Jan 19, 2021
6c88ff5
Add support for imagePullSecret
Jan 20, 2021
865b72e
Merge pull request #7 from Peltarion/parmus/whoami
arnediekmann Mar 25, 2021
61c77c0
Merge pull request #9 from Peltarion/parmus/helm-secret
arnediekmann Mar 25, 2021
4516234
Merge pull request #10 from Peltarion/parmus/helm-pullsecret
arnediekmann Mar 25, 2021
55c1af1
docs: clarify test execution
arnediekmann Mar 25, 2021
11fb703
fix: downgrade k8s libraries to 0.19.0 to fix #8
arnediekmann Mar 25, 2021
c22a4ce
chore: use yq v4 in release script
arnediekmann Mar 25, 2021
8b70f5f
chore: Bump version to 0.1.0.
arnediekmann Mar 25, 2021
5041b63
fix typo in values
denismatyu Jul 1, 2021
5684017
fix typo
denismatyu Jul 1, 2021
f4504a7
Merge pull request #11 from denismatiu/master
arnediekmann Oct 12, 2021
e9100f8
Support newer stable APIs in Helm chart
Dec 1, 2021
687d533
Merge pull request #16 from Peltarion/parmus/helm
arnediekmann Dec 20, 2021
365a0db
chore: Bump version to 0.1.1.
arnediekmann Dec 20, 2021
d6f3d9a
Upgrade dependencies and allign with cert-manager/webhook-example
splattner Jul 17, 2023
8b63a36
Merge pull request #23 from splattner/upgrade-dependencies
arnediekmann Aug 24, 2023
04cc3cc
chore: Bump version to 0.1.2.
arnediekmann Aug 24, 2023
c1db14c
Add the ability to use a DNSimple User API token (#26)
IntegralProgrammer Apr 22, 2024
b5793bb
CI/CD using github actions and a custom dnsimple account (#31)
moll-re May 27, 2024
97de643
allow running as unprivileged pod by choosing a higher port for liste…
moll-re May 27, 2024
1f64cdf
use ko to build images (#34)
moll-re May 27, 2024
01362dd
chore: Configure Renovate (#27)
renovate[bot] May 27, 2024
23d4c7c
bump container version to incorporate new changes
moll-re May 27, 2024
f6d110c
Merge pull request #36 from puzzle/update/helm-release-with-usertoken…
madchr1st Jun 10, 2024
b9630d8
Change wording and handling of .Values.groupName
klopfenstein-puzzle Jun 19, 2024
de52757
chore(deps): update ko-build/setup-ko action to v0.7
renovate[bot] Jun 21, 2024
493e618
More verbosity during k8s test suite
klopfenstein-puzzle Aug 16, 2024
3fa3cce
Add space, iteration time and fix replica conditional
klopfenstein-puzzle Aug 16, 2024
664caec
Merge pull request #45 from puzzle/feature/verbose-test-suite
klopfenstein-puzzle Aug 16, 2024
95b3acf
fix(deps): update module github.com/cert-manager/cert-manager to v1.15.3
renovate[bot] Aug 16, 2024
992d304
Merge pull request #39 from puzzle/renovate/github.com-cert-manager-c…
klopfenstein-puzzle Aug 16, 2024
36ea455
fix(deps): update module github.com/dnsimple/dnsimple-go to v1.7.0
renovate[bot] Aug 16, 2024
4eb60d1
Merge pull request #43 from puzzle/renovate/ko-build-setup-ko-0.x
klopfenstein-puzzle Aug 16, 2024
3765f9b
Merge pull request #40 from puzzle/renovate/github.com-dnsimple-dnsim…
klopfenstein-puzzle Aug 16, 2024
3412b5f
Adjust wording
klopfenstein-puzzle Aug 26, 2024
a3bb504
Merge pull request #42 from puzzle/fix/group-name
klopfenstein-puzzle Aug 26, 2024
8cd8638
chore: Bump version to 0.1.4
klopfenstein-puzzle Aug 26, 2024
038038d
Merge pull request #46 from puzzle/bump/version-0.1.4
klopfenstein-puzzle Aug 26, 2024
db70e03
fix(deps): update module k8s.io/klog to v2 (#41)
renovate[bot] Aug 28, 2024
834ddb0
chore(deps): update dependency go to v1.23.2
renovate[bot] Oct 1, 2024
e66140e
fix(deps): update module github.com/cert-manager/cert-manager to v1.16.1
renovate[bot] Oct 9, 2024
378611c
chore: :bookmark: Bumb version to 0.1.5
bacht-fidi Oct 17, 2024
65e6848
fix: :bug: removed legacy apiversions and set it as static value
bacht-fidi Oct 17, 2024
f46d9ae
Merge pull request #1 from bacht-fidi/fix/remove-legacy-apiversions
bacht-fidi Oct 17, 2024
9169711
prerequisite cert-manager >= 1.0.0 for v1 version
Pidu2 Oct 17, 2024
7ceb198
Merge pull request #50 from bacht-fidi/master
Pidu2 Oct 17, 2024
fad72af
fix variable that went missing
Pidu2 Oct 17, 2024
613b615
Merge pull request #51 from puzzle/fix-variable-error
Pidu2 Oct 17, 2024
471ed30
Merge pull request #47 from puzzle/renovate/go-1.x
Pidu2 Oct 28, 2024
a45e4c7
Merge pull request #48 from puzzle/renovate/github.com-cert-manager-c…
Pidu2 Oct 28, 2024
e7f24d9
fix(deps): update kubernetes packages to v0.31.3
renovate[bot] Nov 21, 2024
121465e
fix(deps): update module github.com/cert-manager/cert-manager to v1.16.2
renovate[bot] Nov 21, 2024
98f7cf1
chore(deps): update dependency go to v1.23.4
renovate[bot] Dec 3, 2024
49545c5
Merge pull request #53 from puzzle/renovate/github.com-cert-manager-c…
Pidu2 Dec 9, 2024
b956921
increase kubernetes version for minikube testing
Pidu2 Dec 9, 2024
7b82d25
Merge pull request #54 from puzzle/increase-k8s-version
Pidu2 Dec 9, 2024
5753a60
Merge pull request #52 from puzzle/renovate/go-1.x
Pidu2 Dec 10, 2024
7f54bf5
Merge pull request #38 from puzzle/renovate/kubernetes-go
Pidu2 Dec 10, 2024
7c57e63
update image in chart to v0.1.6
Pidu2 Dec 10, 2024
18a5c7f
Merge pull request #55 from puzzle/update-chart-image
Pidu2 Dec 10, 2024
de3f9ec
update image in chart to v0.1.6
Pidu2 Dec 10, 2024
e858010
Merge pull request #56 from puzzle/update-chart-image
Pidu2 Dec 10, 2024
74ef89d
chore(deps): update helm/chart-releaser-action action to v1.7.0
renovate[bot] Jan 24, 2025
2fc9ca2
chore(deps): update dependency go to v1.24.0
renovate[bot] Feb 11, 2025
54cec3f
fix(deps): update module github.com/cert-manager/cert-manager to v1.17.1
renovate[bot] Feb 14, 2025
6b9a01f
Merge pull request #61 from puzzle/renovate/helm-chart-releaser-actio…
madchr1st Feb 26, 2025
4d91718
Merge pull request #58 from puzzle/renovate/go-1.x
madchr1st Feb 26, 2025
8eadc84
Merge pull request #59 from puzzle/renovate/github.com-cert-manager-c…
madchr1st Feb 26, 2025
499e9c0
fix(deps): update kubernetes packages to v0.32.2
renovate[bot] Feb 26, 2025
4d88804
Merge pull request #57 from puzzle/renovate/kubernetes-go
madchr1st Feb 26, 2025
6191f78
chore(deps): update ko-build/setup-ko action to v0.8
renovate[bot] Feb 26, 2025
9b0da08
Merge pull request #60 from puzzle/renovate/ko-build-setup-ko-0.x
madchr1st Feb 26, 2025
886d4f4
Retry tests on network errors, improve test docs (#64)
klopfenstein-puzzle Mar 12, 2025
10a676d
fix(deps): update kubernetes packages to v0.32.3
renovate[bot] Mar 14, 2025
a1245bd
chore(deps): update dependency go to v1.24.2
renovate[bot] Apr 1, 2025
ef73e0d
chore(deps): update ko-build/setup-ko action to v0.9
renovate[bot] Apr 11, 2025
031acc3
Merge pull request #66 from puzzle/renovate/ko-build-setup-ko-0.x
Pidu2 Apr 22, 2025
bae3149
Merge pull request #65 from puzzle/renovate/kubernetes-go
Pidu2 Apr 22, 2025
faa5451
Merge pull request #63 from puzzle/renovate/go-1.x
Pidu2 Apr 22, 2025
199aa11
chore(deps): update ghcr.io/puzzle/cert-manager-webhook-dnsimple dock…
renovate[bot] Apr 22, 2025
1f55bcb
Merge pull request #62 from puzzle/renovate/ghcr.io-puzzle-cert-manag…
Pidu2 Apr 22, 2025
a479b49
Change: Releases now contain commit digests, automerge renovate (#70)
klopfenstein-puzzle May 8, 2025
64aeca8
fix(deps): update module github.com/cert-manager/cert-manager to v1.1…
renovate[bot] May 8, 2025
b4768d6
fix(deps): update module sigs.k8s.io/controller-runtime to v0.20.4 (#69)
renovate[bot] May 8, 2025
5aeb0ac
chore(deps): update dependency go to v1.24.3 (#71)
renovate[bot] May 9, 2025
793c0e9
chore(deps): update dependency go to v1.24.4 (#74)
renovate[bot] Jun 7, 2025
489cbb9
fix(deps): update module github.com/cert-manager/cert-manager to v1.1…
renovate[bot] Jun 13, 2025
73543b0
Change: Add check labels workflow to PRs, have renovate add labels to…
klopfenstein-puzzle Jun 19, 2025
38d9903
dummy auto-release.yaml
klopfenstein-puzzle Jun 19, 2025
008d6c4
fix(deps): update module github.com/cert-manager/cert-manager to v1.1…
renovate[bot] Jun 20, 2025
3979743
chore: Update versions for release v0.1.9
github-actions[bot] Jun 20, 2025
340b074
Revert "chore: Update versions for release v0.1.9"
klopfenstein-puzzle Jun 20, 2025
cd3cc8b
chore: Update versions for release v0.1.9
github-actions[bot] Jun 20, 2025
11fd70f
fix(deps): update module github.com/cert-manager/cert-manager to v1.1…
renovate[bot] Jul 4, 2025
5cb03d0
Automatic patch releases (#78)
klopfenstein-puzzle Jul 9, 2025
0402c61
chore(deps): update dependency go to v1.24.5 (#80)
renovate[bot] Jul 11, 2025
12a024f
chore(deps): update dependency go to v1.24.6 (#81)
renovate[bot] Aug 8, 2025
ddbdd6b
Add code of conduct and codeowner file
elatella Aug 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!--
Thank you for your contribution to cert-manager-webhook-dnsimple!
Before submitting your PR, please ensure that you have filled out the checklist.
-->

# Summary
- ...

Checklist:
* [ ] My PR has a meaningful title
* [ ] I have labeled my PR with _one_ of the following labels:
- `major, minor, patch`
* [ ] I have written a brief and concise summary
* [ ] I have updated Go tests, if applicable
236 changes: 236 additions & 0 deletions .github/workflows/auto-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
name: Automated patch release

on:
schedule:
- cron: '0 12 1 * *'
workflow_dispatch:

jobs:
check:
runs-on: ubuntu-latest
outputs:
has_changes: ${{ steps.check-prs.outputs.has_changes }}
non_patch_prs: ${{ steps.check-prs.outputs.non_patch_prs }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

# We only continue if the last release was actually a month ago
- name: Check age of last release
id: check-age
env:
GH_TOKEN: ${{ github.token }}
run: |
RELEASE=$(gh release view --json name,createdAt)
CREATED_AT=$(echo "$RELEASE" | jq -r .createdAt)
CREATED_TIMESTAMP=$(date -d "$CREATED_AT" +%s)
CURRENT_TIMESTAMP=$(date +%s)
DAYS_DIFF=$(( ($CURRENT_TIMESTAMP - $CREATED_TIMESTAMP) / 86400 ))

echo "Latest release $(echo "$RELEASE" | jq .name) was published at $CREATED_AT, $DAYS_DIFF days ago."
echo "skip=$([ $DAYS_DIFF -lt 30 ] && echo "true" || echo "false")" >> "$GITHUB_OUTPUT"

# Any PR since last month that is not authored by renovate and does NOT have a "patch" label will cause this run to be skipped.
# Renovate automerges minor changes as well, but we consider such as patches as it's only affects packages.
- name: Check for merged PRs since last release
id: check-prs
if: ${{ steps.check-age.outputs.skip != 'true' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
LAST_RELEASE=$(git describe --tags --abbrev=0 2>/dev/null || echo "none")
if [ "$LAST_RELEASE" = "none" ]; then
MERGED_PRS=$(gh pr list --state merged --limit 1 --json number)
else
MERGED_PRS=$(gh pr list --state merged --base ${{ github.event.repository.default_branch }} --search "merged:>=$(git log -1 --format=%aI $LAST_RELEASE | cut -d'T' -f1)" --json author,title,labels,number)
fi

if [ "$(echo $MERGED_PRS | jq '. | length')" -gt 0 ]; then
FILTERED_PRS=$(echo "$MERGED_PRS" | jq '[.[] | select(.author.login != "app/renovate") | select((.labels | length < 1) or (.labels | all(.name != "patch")))]')
FILTERED_PRS_AMOUNT=$(echo $FILTERED_PRS | jq length)
if [ "$FILTERED_PRS_AMOUNT" -gt 0 ]; then
echo "::warning title=Non-patch PRs found::A total of $FILTERED_PRS_AMOUNT PRs that are possibly not patch releases have been found"
echo $FILTERED_PRS | jq '.[] | {title: .title, author: "\(.author.login) (\(.author.name))", url: "https://github.com/puzzle/cert-manager-webhook-dnsimple/pull/\(.number)", number: .number}'

echo "has_changes=false" >> "$GITHUB_OUTPUT"
echo "non_patch_prs=true" >> "$GITHUB_OUTPUT"
exit 0
fi

echo "Has changes"
echo "has_changes=true" >> "$GITHUB_OUTPUT"
exit 0
fi

echo "Has no changes"
echo "has_changes=false" >> "$GITHUB_OUTPUT"

- name: Notify if bad
id: notify-abort
if: ${{ steps.check-prs.outputs.has_changes == 'false' && steps.check-prs.outputs.non_patch_prs == 'true' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
THIS_RUN=$(gh run --repo ${{ github.repository }} view ${{ github.run_id }} --json jobs --jq '.jobs[] | select(.name == "${{ github.job }}") | .url')
MSG=$(cat <<EOF
:warning: Did not create an automated patch release because it could contain PRs with changes more impactful than just a patch.
[Check the logs of the latest run](${THIS_RUN}#step:4:1) please and manually create a release after review :isforme:
EOF
)

BODY=$(cat .github/workflows/rk_body.json | jq ".text = \"$MSG\"")
curl -X POST -H 'Content-Type: application/json' --data "$BODY" ${{ secrets.RK_WEBHOOK_URL }}

update:
needs: check
if: ${{ needs.check.outputs.has_changes == 'true' }}
runs-on: ubuntu-latest
outputs:
chart: ${{ steps.new-versions.outputs.chart }}
app: ${{ steps.new-versions.outputs.app }}
tag: ${{ steps.new-versions.outputs.tag }}
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_SECRET }}

- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
token: ${{ steps.app-token.outputs.token }}

# fetch-tags: true is broken
- name: Fetch all tags
run: git fetch --depth=1 --tags

- name: Get new versions
id: new-versions
run: |
bump_patch() {
clean=$(echo "$1" | sed 's|[v\"]||g')

major=$(echo "$clean" | cut -d. -f1)
minor=$(echo "$clean" | cut -d. -f2)
patch=$(echo "$clean" | cut -d. -f3)

patch=$((patch + 1))

echo "$major.$minor.$patch"
}

CHART_VERSION=$(bump_patch $(cat charts/cert-manager-webhook-dnsimple/Chart.yaml | grep "version:" | awk '{print $2}'))
APP_VERSION=$(echo "v$(bump_patch $(cat charts/cert-manager-webhook-dnsimple/Chart.yaml | grep 'appVersion:' | awk '{print $2}'))")
TAG=$(echo "v$(bump_patch $(git tag -l 'v*' --sort=committerdate | tail -n 1))")

echo -e "New app version: $APP_VERSION\nNew chart version: $CHART_VERSION\nNew tag: $TAG"

echo "chart=$CHART_VERSION" >> "$GITHUB_OUTPUT"
echo "app=$APP_VERSION" >> "$GITHUB_OUTPUT"
echo "tag=$TAG" >> "$GITHUB_OUTPUT"

- name: Update versions
id: update-versions
run: |
export TERM=xterm-color
yq e '.appVersion = "${{ steps.new-versions.outputs.app }}"' -i charts/cert-manager-webhook-dnsimple/Chart.yaml
yq e '.version = "${{ steps.new-versions.outputs.chart }}"' -i charts/cert-manager-webhook-dnsimple/Chart.yaml
yq e '.image.tag = "${{ steps.new-versions.outputs.tag }}"' -i charts/cert-manager-webhook-dnsimple/values.yaml

git diff

git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add -u

git commit -m "chore: Update versions for chart release ${{ steps.new-versions.outputs.chart }}"
git tag -a "${{ steps.new-versions.outputs.tag }}" -m "Release ${{ steps.new-versions.outputs.tag }}"

echo "Git tags AFTER creating our own (${{ steps.new-versions.outputs.tag }})"
git tag

git push && git push origin "${{ steps.new-versions.outputs.tag }}"

- name: Await docker build
id: docker-build
env:
GH_TOKEN: ${{ github.token }}
run: |
echo "Waiting for release workflow to complete..."
sleep 5

# ID can be derived using 'gh workflow list'
# The ID below is of the "Build tagged Docker image" workflow
WORKFLOW_ID=99918806
RUN_DETAILS=$(gh run list --workflow="$WORKFLOW_ID" --branch="${{ steps.new-versions.outputs.tag }}" --json conclusion,status,url,databaseId)
echo $RUN_DETAILS | jq -r .[0].url

for i in {1..30}; do
RUN_DETAILS=$(gh run list --workflow="$WORKFLOW_ID" --branch="${{ steps.new-versions.outputs.tag }}" --json conclusion,status,url,databaseId)
if [ $(echo $RUN_DETAILS | jq length) -gt 0 ]; then
RUN_ID=$(echo $RUN_DETAILS | jq -r .[0].databaseId)
STATUS=$(gh run view "$RUN_ID" --json conclusion --jq .conclusion)
if [ "$STATUS" = "success" ]; then
echo "Docker build workflow has concluded"
exit 0
elif [ "$STATUS" = "failure" ]; then
echo "::error title=Docker build failed::Docker build action has failed"
exit 1
fi
fi
sleep 20
done

echo "::error title=Docker build timed out::Timed out awaiting docker build action"
exit 1

trigger-release:
needs: update
uses: ./.github/workflows/helm-release.yaml
with:
release-body-addendum: "Automated release"

# Only notify on success or failure
notify:
needs:
- update
- check
if: ${{ always() && needs.check.outputs.non_patch_prs != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Notify status
env:
GH_TOKEN: ${{ github.token }}
run: |
THIS_RUN=$(gh run --repo ${{ github.repository }} view ${{ github.run_id }} --json jobs --jq '.jobs[] | select(.name == "${{ github.job }}") | .url')

CONCLUSION=$(gh run view ${{ github.run_id }} --json jobs | jq -r '.jobs[] | select(.name == "update") | .conclusion')
TRIGGER_CONCLUSION=$(gh run view ${{ github.run_id }} --json jobs | jq -r '.jobs[] | select(.name | startswith("trigger-release")) | .conclusion')
echo "Update job conclusion: $CONCLUSION"
echo "Trigger-release job conclusion: $TRIGGER_CONCLUSION"

if [ "$CONCLUSION" == "success" -a "$TRIGGER_CONCLUSION" == "success" ]; then
MSG=$(cat <<EOF
:white_check_mark: Automated patch release completed successfully!
New chart version: ${{ needs.update.outputs.chart }}
New app version: ${{ needs.update.outputs.app }}
New tag: ${{ needs.update.outputs.tag }}
EOF
)

elif [ "$CONCLUSION" == "failure" -o "$TRIGGER_CONCLUSION" == "failure" ]; then
MSG=":x: Automated patch release failed. Please [check the logs]($THIS_RUN)."
else
MSG=":warning: Automated patch release possibly failed! Please [check the logs]($THIS_RUN)."
fi

if [ -n "$MSG" ]; then
BODY=$(cat .github/workflows/rk_body.json | jq ".text = \"$MSG\"")
curl -X POST -H 'Content-Type: application/json' --data "$BODY" ${{ secrets.RK_WEBHOOK_URL }}
fi
48 changes: 48 additions & 0 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build docker images

on:
workflow_call:
inputs:
tags:
description: 'Tags to build the image for (separated by a whitespace)'
required: true
type: string


jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4


- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: src/go.mod
cache-dependency-path: src/go.sum


- name: Get go dependencies
run: |
cd src
go mod download


- name: Setup ko
# KO is a tool for building go container images https://ko.build/
uses: ko-build/setup-ko@v0.9
# KO is configured to use GHCR as the registry


- name: Format tags with a comma
id: format-tags
run: echo "TAGS=$(echo ${{ inputs.tags }} | tr ' ' ',')" >> $GITHUB_OUTPUT


- name: Build images
run: |
cd src
ko build --tags="${{ steps.format-tags.outputs.TAGS }}" --platform=linux/amd64,linux/arm64 --bare --sbom=none
19 changes: 19 additions & 0 deletions .github/workflows/check-labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check PR Labels

permissions:
contents: read
pull-requests: read

on:
pull_request:
types: [opened, reopened, labeled, unlabeled, synchronize]

jobs:
check_labels:
name: Check labels
runs-on: ubuntu-latest
steps:
- uses: docker://agilepathway/pull-request-label-checker:latest
with:
one_of: major,minor,patch
repo_token: ${{ secrets.GITHUB_TOKEN }}
56 changes: 56 additions & 0 deletions .github/workflows/helm-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This workflow publishes a new chart release to github pages
# The content of the branch gh-pages is then published to https://puzzle.github.io/cert-manager-webhook-dnsimple/
name: Release a new chart version

on:
workflow_dispatch:
workflow_call:
inputs:
release-body-addendum:
type: string
required: false

jobs:
release:
permissions:
contents: write

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.repository.default_branch }}
# fetch-tags: true - from experience, this usually results in errors
# > Also see: https://github.com/actions/checkout/issues/1467

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.7.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
charts_dir: ./charts

- name: Add commit digest to GH release
run: |
git fetch --tags
LAST_TAG=$(git tag --list 'cert-manager-webhook-dnsimple*' --sort=-v:refname | sed -n '2p')
CURRENT_TAG=$(git tag --list 'cert-manager-webhook-dnsimple*' --sort=-v:refname | sed -n '1p')
COMMITS=$(git log ${LAST_TAG}..${CURRENT_TAG} --oneline | sed 's/^/- /')

# Workaround to get newlines working
echo -e "### Changes since \`${LAST_TAG}\`\n\n${COMMITS}" > msg

if [[ -n "${{ inputs.release-body-addendum }}" ]]; then
echo -e "\n${{ inputs.release-body-addendum }}" >> msg
fi

gh release edit ${CURRENT_TAG} --notes "$(cat msg)"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 5 additions & 0 deletions .github/workflows/rk_body.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"avatar": "https://github.githubassets.com/images/icons/emoji/shipit.png",
"username": "cert-manager-webhook-dnsimple",
"text": "This message should be different"
}
Loading