Skip to content

Commit a186ac7

Browse files
committed
[FEATURE] Add ddclient
1 parent 20b9095 commit a186ac7

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

.github/workflows/ddclient.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: ddclient
2+
3+
on:
4+
push:
5+
paths:
6+
- ddclient/**
7+
schedule:
8+
- cron: 0 0 * * *
9+
workflow_dispatch:
10+
11+
jobs:
12+
update:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
version: ${{ steps.version.outputs.version }}
16+
steps:
17+
- uses: docker/login-action@v1
18+
with:
19+
username: ${{ secrets.DOCKERHUB_USERNAME }}
20+
password: ${{ secrets.DOCKERHUB_TOKEN }}
21+
- id: version
22+
env:
23+
DOCKER_CLI_EXPERIMENTAL: enabled
24+
run: |
25+
export VERSION=$(curl https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | tar -Oxz | grep -FaxA1 "P:ddclient" | tail -n1 | cut -d: -f2)
26+
docker manifest inspect ${{ secrets.DOCKERHUB_USERNAME }}/ddclient:${VERSION} > /dev/null && echo "" || echo "::set-output name=version::${VERSION}"
27+
publish:
28+
needs: update
29+
if: ${{ needs.update.outputs.version }}
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v2
33+
- uses: docker/setup-qemu-action@v1
34+
- uses: docker/setup-buildx-action@v1
35+
- uses: docker/login-action@v1
36+
with:
37+
username: ${{ secrets.DOCKERHUB_USERNAME }}
38+
password: ${{ secrets.DOCKERHUB_TOKEN }}
39+
- uses: docker/build-push-action@v2
40+
with:
41+
build-args: |
42+
VERSION=${{ needs.update.outputs.version }}
43+
context: ddclient
44+
file: ddclient/Dockerfile
45+
platforms: |
46+
linux/amd64
47+
linux/arm64
48+
push: true
49+
tags: |
50+
${{ secrets.DOCKERHUB_USERNAME }}/ddclient
51+
${{ secrets.DOCKERHUB_USERNAME }}/ddclient:${{ needs.update.outputs.version }}

ddclient/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM alpine:edge
2+
3+
ARG VERSION
4+
5+
RUN set -ex; \
6+
echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" | tee -a "/etc/apk/repositories"; \
7+
apk add --no-cache ddclient="${VERSION}"
8+
9+
VOLUME [ "/etc/ddclient" ]
10+
11+
CMD [ "/usr/bin/ddclient", "-foreground" ]

0 commit comments

Comments
 (0)