Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add caddy-update workflow #18

Merged
merged 1 commit into from
Jan 13, 2024
Merged
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
43 changes: 43 additions & 0 deletions .github/workflows/caddy-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: caddy-update

on:
workflow_dispatch:
schedule:
- cron: '00 12 * * *'

jobs:
caddy-update:
name: update caddy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run caddy-container-update
run: |
# Xcaddy
xcaddy_version="$(
git ls-remote https://github.com/caddyserver/xcaddy v* \
| cut -d/ -f3 \
| sort -V \
| grep -E "^v[0-9\.]+$" \
| tail -1
)"
sed -i "s|^ENV XCADDY_VERSION.*$|ENV XCADDY_VERSION $xcaddy_version|" ./Dockerfile

# caddy_hash
caddy_hash="$(
git ls-remote https://github.com/porech/caddy-maxmind-geolocation master \
| cut -f1 \
| tail -1
)"
sed -i "s|^ENV CADDY_HASH.*$|ENV CADDY_HASH $caddy_hash|" ./Dockerfile

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: caddy-update automated change
signoff: true
title: caddy container update
body: Automated caddy container update
labels: dependencies, 3. to review
milestone: next
branch: caddy-container-update