Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
653dcb4
chore: update alpine image.
SimplicityGuy Jul 16, 2022
9701554
fix: SC2086 shellcheck fixes.
SimplicityGuy Jul 16, 2022
82875ab
fix: SC2004 shellcheck fixes.
SimplicityGuy Jul 16, 2022
8c8e19c
fix: SC2006 shellcheck fixes.
SimplicityGuy Jul 16, 2022
4d94552
fix: SC2236 shellcheck fixes.
SimplicityGuy Jul 16, 2022
96e699c
fix: SC2162 shellcheck fixes.
SimplicityGuy Jul 16, 2022
dcd3e42
fix: SC2166 shellcheck fixes.
SimplicityGuy Jul 16, 2022
6d92c31
fix: SC2005 and SC2046 shellcheck fixes.
SimplicityGuy Jul 16, 2022
882fb13
fix: SC1001, SC2018, SC2019 shellcheck fixes.
SimplicityGuy Jul 16, 2022
f18275e
fix: simplifying logic.
SimplicityGuy Jul 16, 2022
99aa59d
chore: whitespace and dead code cleanup.
SimplicityGuy Jul 16, 2022
dc18a51
chore: reorganization.
SimplicityGuy Jul 16, 2022
c685687
chore: rename function to better describe what it does.
SimplicityGuy Jul 16, 2022
8426541
chore: adding error handling.
SimplicityGuy Jul 16, 2022
f0c3063
chore: standardize on {}.
SimplicityGuy Jul 16, 2022
7f29f06
chore: standardizing on env vars.
SimplicityGuy Jul 16, 2022
1d844f8
chore: missed one spot using previously set env var.
SimplicityGuy Jul 16, 2022
2b1c209
Merge pull request #1 from SimplicityGuy/fixes
SimplicityGuy Jul 16, 2022
8f1d920
chore: tabs to spaces.
SimplicityGuy Jul 16, 2022
c4da20c
fix: addressing issue with parsing json.
SimplicityGuy Jul 16, 2022
36ef24f
chore: omit additional items.
SimplicityGuy Jul 16, 2022
a523ad7
fix: reset COMMENT.
SimplicityGuy Jul 16, 2022
9316c9f
fix: address jq parsing errors when some properties are not set.
SimplicityGuy Jul 16, 2022
0643e9c
chore: moving line to be consistent.
SimplicityGuy Jul 16, 2022
08bbcef
fix: cleaning script creation.
SimplicityGuy Jul 16, 2022
e69b276
chore: nicer formatting.
SimplicityGuy Jul 16, 2022
31d0b73
chore: cleaning up echos.
SimplicityGuy Jul 16, 2022
9da4249
fix: moving the top level key name to the "name" property.
SimplicityGuy Jul 16, 2022
c530324
Merge pull request #2 from SimplicityGuy/additional-fixes
SimplicityGuy Jul 16, 2022
76b524f
chore: merge from private git repo.
SimplicityGuy Aug 7, 2022
035cd4a
feat: Major Updates
SimplicityGuy Feb 19, 2023
022399e
feat: adding TEST_MODE.
SimplicityGuy Mar 5, 2023
2b364b9
fix: fixing @random since it was broken and removing @every since it …
SimplicityGuy Mar 5, 2023
899ec9c
fix: allow multiple networks.
SimplicityGuy May 21, 2023
2b46bb2
chore: remove FUNDING.yml
SimplicityGuy May 21, 2023
ccaf605
chore: remove forked build.yml.
SimplicityGuy Jun 24, 2023
e3bfdeb
chore: move build to the repo rather than the dockerfiles repo.
SimplicityGuy Jun 24, 2023
4cfb302
fix: typo.
SimplicityGuy Jun 24, 2023
ac49cae
chore: remove arm64.
SimplicityGuy Jun 24, 2023
c7a8352
chore: update and upgrade require the cache.
SimplicityGuy Jun 24, 2023
c3a1963
feat: cleanup old images on the 15th of the month.
SimplicityGuy Jun 26, 2023
9c8b32c
chore: add discord notification to cleanup.
SimplicityGuy Jun 26, 2023
5aeeb19
fix: missed id.
SimplicityGuy Jun 26, 2023
a72e847
chore: update pre-commit.
SimplicityGuy Dec 31, 2024
5172ed0
fix: use docker user.
SimplicityGuy Dec 31, 2024
a87292b
chore: casing.
SimplicityGuy Dec 31, 2024
1a540df
fix: make /var/log/crontab writeable for everyone.
SimplicityGuy Jan 5, 2025
18880be
fix: LOG_DIR is not used anywhere, remove it.
SimplicityGuy Jan 5, 2025
799ccc8
fix: permissions for /opt/crontab.
SimplicityGuy Jan 5, 2025
176cb2e
fix: move back to root user to debug permissions more completely.
SimplicityGuy Jan 5, 2025
7725e2f
fix: handle users at Dockerfile instead of in entrypoint script.
SimplicityGuy Jan 11, 2025
165ea6a
chore: update pre-commit.
SimplicityGuy Jan 11, 2025
495c98f
fix: use rootless.
SimplicityGuy Jan 11, 2025
8cd6616
fix: using docker user and back to dind.
SimplicityGuy Jan 11, 2025
903fb60
fix: trying out gosu.
SimplicityGuy Jan 11, 2025
7b24975
fix: change group.
SimplicityGuy Jan 11, 2025
0338bed
fix: Dockerfile to reduce vulnerabilities
snyk-bot Jan 17, 2025
a2c6492
chore: update pre-commit.
SimplicityGuy Jun 19, 2025
3a01924
fix: attempt to fix startup issues.
SimplicityGuy Jun 19, 2025
e333194
Merge pull request #7 from SimplicityGuy/snyk-fix-0d72670c2bce0340446…
SimplicityGuy Jun 19, 2025
23e4961
fix: Dockerfile to reduce vulnerabilities
snyk-bot Jun 19, 2025
243d4a3
fix: fix docker build.
SimplicityGuy Jun 19, 2025
738857a
Merge branch 'main' of github.com:SimplicityGuy/docker-crontab into s…
SimplicityGuy Jun 19, 2025
a2a7754
Merge pull request #8 from SimplicityGuy/snyk-fix-8994dbf363bbd972bbd…
SimplicityGuy Jun 19, 2025
fc27569
fix: Dockerfile to reduce vulnerabilities
snyk-bot Jun 19, 2025
c12805e
Merge pull request #9 from SimplicityGuy/snyk-fix-ff09303c15dc246c2ac…
SimplicityGuy Jun 19, 2025
9052ef7
fix: add su-exec.
SimplicityGuy Jun 19, 2025
8fb0222
chore: update claude docs.
SimplicityGuy Jun 29, 2025
48f67b1
chore: update pre-commit.
SimplicityGuy Jun 29, 2025
60bc7f4
fix: permission error.
SimplicityGuy Jun 29, 2025
598be37
fix: fix the error 'can't set groups: Operation not permitted'.
SimplicityGuy Jun 30, 2025
05710ab
fix: use crond -s flag to prevent user switching errors
SimplicityGuy Jul 6, 2025
c5a802c
fix: correct scripts and update dependencies
SimplicityGuy Jul 19, 2025
c637f74
fix: filter out unsupported -s flag for BusyBox crond
SimplicityGuy Jul 26, 2025
26f5591
fix: moving the CRONTAB_FILE.
SimplicityGuy Aug 3, 2025
6d8f92f
fix: Issue was that the environment variable wasn't being expanded i…
SimplicityGuy Aug 16, 2025
26afa4f
chore: update pre-commit.
SimplicityGuy Aug 16, 2025
1d28255
fix: BusyBox crond crontab directory configuration
SimplicityGuy Aug 19, 2025
9c42e53
chore: update deps
SimplicityGuy Dec 30, 2025
6ab1073
fix: use user-writable crontab directory for non-root execution
SimplicityGuy Dec 31, 2025
a25fe1b
chore(ci): improve build workflow performance and security
SimplicityGuy Dec 31, 2025
07c5630
chore(ci): add Dependabot configuration for automated updates
SimplicityGuy Dec 31, 2025
5e054bb
feat(ci): add automated workflow for base image updates
SimplicityGuy Dec 31, 2025
efec878
chore(ci): improve workflow naming consistency
SimplicityGuy Dec 31, 2025
68fcc41
feat(ci): add automatic PR cache cleanup workflow
SimplicityGuy Dec 31, 2025
1008eb4
feat(ci): improve Docker image cleanup workflow
SimplicityGuy Dec 31, 2025
52bfb15
feat(ci): add multi-platform Docker build support
SimplicityGuy Dec 31, 2025
6d5dd2e
fix(ci): correct package name in image cleanup workflow
SimplicityGuy Dec 31, 2025
06ff98c
feat(build): add multi-platform support for rq binary downloads
SimplicityGuy Dec 31, 2025
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
15 changes: 3 additions & 12 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# These are supported funding model platforms

github: [willfarrell]# Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
github: [SimplicityGuy]
ko_fi: robertwlodarczyk
custom: [paypal.me/RWlodarczyk]
45 changes: 45 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
version: 2
updates:
# GitHub Actions dependencies
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
timezone: "America/Los_Angeles"
commit-message:
prefix: "ci"
include: "scope"
labels:
- "dependencies"
- "ci"
assignees:
- "SimplicityGuy"
groups:
actions:
patterns:
- "*"

# Docker base images
# Monitors Dockerfile for base image updates (docker:dind-alpine)
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
timezone: "America/Los_Angeles"
commit-message:
prefix: "docker"
include: "scope"
labels:
- "dependencies"
- "docker"
assignees:
- "SimplicityGuy"
groups:
docker-images:
patterns:
- "*"
95 changes: 62 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,78 @@
name: build
---
name: Build

on:
workflow_dispatch:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
schedule:
- cron: '0 0 * * *'
- cron: '0 1 * * 6'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.actor }}/crontab

jobs:
multi:
build-crontab:
runs-on: ubuntu-latest
timeout-minutes: 90

permissions:
contents: read
packages: write

steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
- name: Checkout repository.
uses: actions/checkout@v4
with:
submodules: true

- name: Log in to the GitHub Container Registry.
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}

- if: github.ref == 'refs/heads/main'
name: Conditional(Set tag as `latest`)
run: echo "tag=willfarrell/crontab:latest" >> $GITHUB_ENV
- name: Extract metadata (tags, labels) for Docker.
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=ref,event=pr
type=schedule,pattern={{date 'YYYYMMDD'}}

- if: startsWith(github.ref, 'refs/tags/')
name: Conditional(Set tag as `{version}`)
run: echo "tag=willfarrell/crontab:${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up QEMU.
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx.
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6

-
name: Build and push
uses: docker/build-push-action@v2
- name: Build and push Docker image to GitHub Container Registry.
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ env.tag }}
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
provenance: true
sbom: true
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Send notification to Discord.
uses: sarisia/actions-status-discord@b8381b25576cb341b2af39926ab42c5056cc44ed # v1.15.5
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
36 changes: 36 additions & 0 deletions .github/workflows/cleanup-cache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Cleanup Cache

on:
pull_request:
types:
- closed

concurrency:
group: cleanup-cache-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
cleanup:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
actions: write
steps:
- name: 🧹 Cleanup Cache
run: |
echo "Fetching list of cache keys"
cacheKeysForPR=$(gh cache list --ref "$BRANCH" --limit 100 --json id --jq ".[].id")

## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh cache delete "$cacheKey"
done
echo "Done"
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
29 changes: 29 additions & 0 deletions .github/workflows/cleanup-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Cleanup Docker Images

on:
workflow_dispatch:
schedule:
- cron: "0 0 15 * *" # Monthly on the 15th at midnight UTC

concurrency:
group: cleanup-images
cancel-in-progress: false

jobs:
cleanup:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
packages: write # Required to delete packages
contents: read
steps:
- name: 🧹 Cleanup Docker Images
uses: dataaxiom/ghcr-cleanup-action@cd0cdb900b5dbf3a6f2cc869f0dbb0b8211f50c4 # v1.0.16
with:
package: crontab
delete-partial-images: true
delete-untagged: true
keep-n-tagged: 2
older-than: 30 days
token: ${{ secrets.GITHUB_TOKEN }}
93 changes: 93 additions & 0 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
name: Update Dependencies

on:
schedule:
- cron: '0 9 * * 1' # Weekly on Mondays at 9am UTC
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
update-base-image:
runs-on: ubuntu-latest

steps:
- name: Checkout repository.
uses: actions/checkout@v4

- name: Set up Docker Buildx.
uses: docker/setup-buildx-action@v3

- name: Check for base image updates.
id: check-updates
run: |
# Get current base images from Dockerfile
BUILDER_IMAGE=$(grep "^FROM alpine:latest AS builder" Dockerfile | awk '{print $2}')
RELEASE_IMAGE=$(grep "^FROM docker:.* AS release" Dockerfile | awk '{print $2}')

echo "Current builder image: $BUILDER_IMAGE"
echo "Current release image: $RELEASE_IMAGE"

# Pull latest versions
docker pull "$BUILDER_IMAGE" --quiet
docker pull "$RELEASE_IMAGE" --quiet

# Get digests
BUILDER_DIGEST=$(docker inspect --format='{{.RepoDigests}}' "$BUILDER_IMAGE" | grep -oP 'sha256:[a-f0-9]{64}' | head -1)
RELEASE_DIGEST=$(docker inspect --format='{{.RepoDigests}}' "$RELEASE_IMAGE" | grep -oP 'sha256:[a-f0-9]{64}' | head -1)

echo "builder_digest=$BUILDER_DIGEST" >> $GITHUB_OUTPUT
echo "release_digest=$RELEASE_DIGEST" >> $GITHUB_OUTPUT

# Check if we need to rebuild
if [ -z "$BUILDER_DIGEST" ] || [ -z "$RELEASE_DIGEST" ]; then
echo "updates_available=true" >> $GITHUB_OUTPUT
else
echo "updates_available=false" >> $GITHUB_OUTPUT
fi

- name: Build test image.
if: steps.check-updates.outputs.updates_available == 'true'
uses: docker/build-push-action@v6
with:
context: .
push: false
tags: test-image:latest
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Create Pull Request.
if: steps.check-updates.outputs.updates_available == 'true'
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore(deps): update base image dependencies'
title: 'chore(deps): update base image dependencies'
body: |
## Automated Base Image Update

This PR updates the base Docker images to their latest versions.

### Changes
- Builder image digest: `${{ steps.check-updates.outputs.builder_digest }}`
- Release image digest: `${{ steps.check-updates.outputs.release_digest }}`

### Testing
- Build test completed successfully
- Please review and test the updated images before merging

---
*This PR was automatically generated by the update-dependencies workflow.*
branch: chore/update-base-images
delete-branch: true
assignees: SimplicityGuy
labels: dependencies,automated,docker

- name: Send notification to Discord.
uses: sarisia/actions-status-discord@b8381b25576cb341b2af39926ab42c5056cc44ed # v1.15.5
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
.idea
*.iml

config.json
.vscode
.DS_Store

config.json
config.working.json

jobs/
projects/
32 changes: 32 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
hooks:
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-yaml
- id: detect-aws-credentials
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: b035497fb64e3f9faa91e833331688cc185891e6 # frozen: 0.36.0
hooks:
- id: check-github-workflows

- repo: https://github.com/executablebooks/mdformat
rev: 2d496dbc18e31b83a1596685347ffe0b6041daf0 # frozen: 1.0.0
hooks:
- id: mdformat
additional_dependencies:
- mdformat-gfm

- repo: https://github.com/hadolint/hadolint
rev: 4e697ba704fd23b2409b947a319c19c3ee54d24f # frozen: v2.14.0
hooks:
- id: hadolint
Loading
Loading