Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Image CI
name: Docker Build Dev - Latest

on:
push:
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/docker-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Docker Build Prod - Stable

on:
push:
branches-ignore:
- "master"
pull_request:
branches-ignore:
- "master"

jobs:

build:

runs-on: ubuntu-latest

steps:
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

-
name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: themranderson/afraidorgupdater:stable
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM alpine:latest

RUN apk add --no-cache bash curl cronie

ADD ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

Expand Down
10 changes: 7 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/bin/sh

crontab -l | { cat; echo "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"; } | crontab -
crontab -l | { cat; echo "*/5 * * * * sleep 9 ; curl -s http://sync.afraid.org/u/$1/ >> /tmp/freedns_domain.log 2>/dev/null"; } | crontab -
# Ensure /root/.cache exists for crontab
mkdir -p /root/.cache

crond -f -l 0
(crontab -l 2>/dev/null; echo "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin") | crontab -
(crontab -l 2>/dev/null; echo "*/5 * * * * sleep 9 ; curl -s http://sync.afraid.org/u/$1/ >> /proc/1/fd/1 2>&1") | crontab -

# Start crond in foreground
crond -f