dev-cronie #1
@@ -1,5 +1,4 @@
|
|||||||
.gitignore
|
.gitignore
|
||||||
LICENSE
|
LICENSE
|
||||||
README.md
|
README.md
|
||||||
.drone.yml
|
|
||||||
Dockerfile
|
Dockerfile
|
||||||
-31
@@ -1,31 +0,0 @@
|
|||||||
kind: pipeline
|
|
||||||
name: default
|
|
||||||
steps:
|
|
||||||
- name: docker
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
registry: git.jonb.io
|
|
||||||
dry_run: false
|
|
||||||
username: jblu
|
|
||||||
password:
|
|
||||||
from_secret: gittea_drone
|
|
||||||
repo: git.jonb.io/jblu/hottub
|
|
||||||
tags:
|
|
||||||
- latest
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
- name: docker-test
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
registry: git.jonb.io
|
|
||||||
dry_run: false
|
|
||||||
username: jblu
|
|
||||||
password:
|
|
||||||
from_secret: gittea_drone
|
|
||||||
repo: git.jonb.io/jblu/hottub
|
|
||||||
tags:
|
|
||||||
- dev
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- dev*
|
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- dev*
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v4
|
||||||
|
with:
|
||||||
|
registry: git.jonb.io
|
||||||
|
username: '${{ gitea.actor }}'
|
||||||
|
password: '${{ secrets.JONBIO_CI }}'
|
||||||
|
-
|
||||||
|
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.jonb.io/jblu/hottub:dev
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v4
|
||||||
|
with:
|
||||||
|
registry: git.jonb.io
|
||||||
|
username: '${{ gitea.actor }}'
|
||||||
|
password: '${{ secrets.JONBIO_CI }}'
|
||||||
|
-
|
||||||
|
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.jonb.io/jblu/hottub:latest
|
||||||
+1
-2
@@ -1,5 +1,4 @@
|
|||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
COPY . opt
|
COPY entrypoint.sh /opt
|
||||||
RUN apk add --no-cache supercronic
|
|
||||||
RUN chmod +x /opt/entrypoint.sh
|
RUN chmod +x /opt/entrypoint.sh
|
||||||
CMD ["/opt/entrypoint.sh"]
|
CMD ["/opt/entrypoint.sh"]
|
||||||
+5
-3
@@ -1,7 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
CRON_CONFIG_FILE="/opt/crontab"
|
CRON_CONFIG_FILE="/etc/crontabs/root"
|
||||||
|
|
||||||
echo "${CRON} echo Come in the water is fine. >/dev/null" > $CRON_CONFIG_FILE
|
echo "${CRON} echo Come in the water is fine! > /opt/output.log" >> $CRON_CONFIG_FILE
|
||||||
|
echo "${CRON} echo Turn on the bubbles!" >> $CRON_CONFIG_FILE
|
||||||
|
echo "@reboot echo Come in the water is fine! > /opt/reboot.log" >> $CRON_CONFIG_FILE
|
||||||
|
|
||||||
exec supercronic -passthrough-logs -quiet $CRON_CONFIG_FILE
|
exec crond -f
|
||||||
Reference in New Issue
Block a user