Files
ionosDnsClient/.gitea/workflows/weekly.yaml
Renovate Bot cd0e056841 chore(deps): update actions/setup-go digest to 4b73464 (#16)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/setup-go](https://github.com/actions/setup-go) ([changelog](7a3fe6cf4c..4b73464bb3)) | action | digest | `7a3fe6c` → `4b73464` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My41LjQiLCJ1cGRhdGVkSW5WZXIiOiI0My41LjQiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImFjdGlvbiIsImRlcHMiXX0=-->

Reviewed-on: #16
Reviewed-by: t.behrendt <t.behrendt@noreply.localhost>
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2026-03-15 22:15:56 +01:00

68 lines
2.3 KiB
YAML

name: Update Client
on:
schedule:
- cron: "@weekly"
workflow_dispatch:
jobs:
update-client:
runs-on:
- ubuntu-latest
- linux_amd64
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
with:
go-version: "1.26.0"
- name: Install yq
run: |
sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq
sudo chmod +x /usr/bin/yq
- name: Install openapi codegen
run: go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.4.1
- name: Download Ionos DNS OpenAPI Spec
run: curl -sL https://developer.hosting.ionos.com/assets/kms-swagger-specs/dns.yaml -o openapi.yaml
- name: Compare OpenAPI Versions
id: version_check
run: |
NEW_VERSION=$(yq -r '.info.version' openapi.yaml)
if [ -f openapi_spec.yaml ]; then
OLD_VERSION=$(yq -r '.info.version' openapi_spec.yaml)
else
OLD_VERSION="0.0.0"
fi
echo "New Version: $NEW_VERSION"
echo "Old Version: $OLD_VERSION"
if [ "$NEW_VERSION" != "$OLD_VERSION" ]; then
echo "New version detected"
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
else
echo "No new version detected"
exit 0
fi
- name: Generate OpenAPI Client
if: env.NEW_VERSION
run: |
rm -rf *.go
oapi-codegen --config cfg.yaml openapi.yaml
go mod tidy
- name: Update Local OpenAPI Spec
if: env.NEW_VERSION
run: mv openapi.yaml openapi_spec.yaml
- name: Commit and Push Changes
if: env.NEW_VERSION
run: |
git config user.name "OpenAPI Bot"
git config user.email "t.behrendt@t00n.de"
git add .
git commit -m "Update OpenAPI client to version $NEW_VERSION"
git push
- name: Create Tag
if: env.NEW_VERSION
run: |
git tag -a "v$NEW_VERSION" -m "Update OpenAPI client to version $NEW_VERSION"
git push origin "v$NEW_VERSION"