Build action
ci / docker (push) Successful in 24s

This commit is contained in:
dswd committed 2026-04-20 00:06:12 +02:00
1 parent cefe165e20
commit 40dfc09560
2 files changed
+105 -19

No files matched your search

+15 -19
View File
@@ -7,22 +7,18 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Login to Docker Hub
uses: docker/login-action@v4
with:
registry: git.dswd73.duckdns.org
username: ${{ vars.LOCAL_REPO_USER }}
password: ${{ secrets.LOCAL_REPO_TOKEN }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
-
name: Build and push
uses: docker/build-push-action@v7
with:
push: true
tags: git.dswd73.duckdns.org/dswd/dyndns-updater:latest
- name: Checkout
uses: actions/checkout@v4
- name: Install Buildah
run: |
sudo apt update -y
sudo apt install -y buildah
- name: Build with Buildah
run: |
buildah bud -t my-image:latest .
- name: Login to Registry
run: |
buildah login --username ${{ vars.LOCAL_REPO_USER }} --password ${{ secrets.LOCAL_REPO_TOKEN }} ${{ vars.LOCAL_REPO_URL }}
- name: Push to Registry
run: |
buildah push my-image:latest docker://${{ vars.LOCAL_REPO_URL }}/${{ gitea.repository }}:latest
+90
View File
@@ -0,0 +1,90 @@
# DynDNS Updater
A dynamic DNS updater service that automatically updates DNS records with your current IP address.
## Configuration (config.json)
The `config.json` file contains all settings for the updater. Here's a detailed explanation of each option:
### Root Level Options
#### `ip_lookup` (required)
Specifies the services used to discover your public IP addresses.
```json
"ip_lookup": {
"ipv4": ["https://api.ipify.org", "..."],
"ipv6": ["https://api6.ipify.org", "..."]
}
```
- **`ipv4`** (array of URLs): List of services to query for your IPv4 address. Services are tried in random order until one succeeds.
- **`ipv6`** (array of URLs): List of services to query for your IPv6 address. Services are tried in random order until one succeeds.
#### `domains` (required)
Dictionary containing the active domain configurations to update. Each key is a domain name, and each value is a domain configuration object (see below).
```json
"domains": {
"example.com": { ... },
"another.com": { ... }
}
```
#### `interval` (optional)
How frequently (in seconds) to check for IP changes and update domains. Defaults to `600` (10 minutes).
```json
"interval": 300
```
### Domain Configuration Format
Each entry in the `domains` dictionary has the following structure:
```json
"example.com": {
"modes": ["ipv4", "ipv6"],
"url": "https://api.example.com/update",
"method": "GET",
"params": {
"token": "your-token",
"domain": "${DOMAIN}",
"ip": "${IPV4}"
},
"headers": {
"Authorization": "Bearer token-value"
}
}
```
#### Domain Options
- **`modes`** (array, optional): Which IP versions to update. Options are `"ipv4"` and/or `"ipv6"`. Defaults to `["ipv4"]`.
- **`url`** (string, required): The endpoint URL of your DNS service provider's update API.
- **`method`** (string, optional): HTTP method to use for the update request. Defaults to `"GET"`. Other options: `"POST"`, `"PUT"`, etc.
- **`params`** (object, optional): Query parameters (for GET/HEAD requests) or request body parameters to send with the update request. Supports variable substitution.
- **`headers`** (object, optional): HTTP headers to include in the request. Supports variable substitution. Use for authentication headers like `Authorization` or `X-API-Key`.
#### Variable Substitution
These variables are automatically replaced in `params` and `headers` values:
- `${DOMAIN}`: The domain name being updated
- `${IPV4}`: Your current IPv4 address
- `${IPV6}`: Your current IPv6 address
## Setup
1. Create or edit `config.json` with:
- Configure `ip_lookup` with services to detect your public IPs
- Add your domain configurations to the `domains` section
- Replace placeholder values with your actual API tokens and credentials
- Specify which IP versions to update in `modes` for each domain
- (Optional) Adjust `interval` if needed
2. Run the updater to start keeping your DNS records current