Files
ionosDnsClient/.gitea/workflows/weekly.yaml
T
renovate-bot 6c4c832372 chore(deps): update actions/setup-go action to v7 (#35)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/setup-go](https://github.com/actions/setup-go) | action | major | `v6.5.0` → `v7.0.0` |

---

### Release Notes

<details>
<summary>actions/setup-go (actions/setup-go)</summary>

### [`v7.0.0`](https://github.com/actions/setup-go/releases/tag/v7.0.0)

[Compare Source](https://github.com/actions/setup-go/compare/v7.0.0...v7.0.0)

##### What's Changed

- Migrate to ESM and upgrade dependencies by [@&#8203;priyagupta108](https://github.com/priyagupta108) in [#&#8203;763](https://github.com/actions/setup-go/pull/763)
- chore(deps): bump [@&#8203;actions/cache](https://github.com/actions/cache) to 6.2.0 by [@&#8203;philip-gai](https://github.com/philip-gai) in [#&#8203;771](https://github.com/actions/setup-go/pull/771)

##### New Contributors

- [@&#8203;philip-gai](https://github.com/philip-gai) made their first contribution in [#&#8203;771](https://github.com/actions/setup-go/pull/771)

**Full Changelog**: <https://github.com/actions/setup-go/compare/v6...v7.0.0>

### [`v7`](https://github.com/actions/setup-go/compare/v6.5.0...v7.0.0)

[Compare Source](https://github.com/actions/setup-go/compare/v6.5.0...v7.0.0)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, 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 [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNjMuOSIsInVwZGF0ZWRJblZlciI6IjQzLjI2My45IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhY3Rpb24iLCJhdXRvbWVyZ2UiLCJkZXBzIl19-->

Reviewed-on: #35
Reviewed-by: t.behrendt <2+t.behrendt@noreply.localhost>
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2026-07-27 16:37:09 +02: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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Setup Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: 'go.mod'
- 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"