Skip to content

Commit

Permalink
Update(release): workflow to update the caddy-docker-proxy module
Browse files Browse the repository at this point in the history
  • Loading branch information
till committed Oct 16, 2024
1 parent 861e49d commit cb20ca6
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/update-cdp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: update

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

permissions:
contents: "write"
pull-requests: "write"

jobs:
updatecli:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: updatecli/updatecli-action@v2
- run: updatecli diff --config ./updatecli/updatecli.d
env:
UPDATECLI_GITHUB_ACTOR: ${{ github.actor }}
UPDATECLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: updatecli apply --debug --config ./updatecli/updatecli.d
env:
UPDATECLI_GITHUB_ACTOR: ${{ github.actor }}
UPDATECLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion rootfs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM caddy:2.8.4-builder as builder

ARG CDP_VERSION=v2.9.1

RUN xcaddy build \
--with github.com/ss098/certmagic-s3 \
--with github.com/lucaslorentz/caddy-docker-proxy@v2.9.1
--with github.com/lucaslorentz/caddy-docker-proxy@${CDP_VERSION}

FROM caddy:2.8.4

Expand Down
48 changes: 48 additions & 0 deletions updatecli/updatecli.d/cdp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Update caddy-docker-proxy from upstream

scms:
default:
kind: github
spec:
user: hostwithquantum
email: [email protected]
username: '{{ requiredEnv "UPDATECLI_GITHUB_ACTOR" }}'
owner: "hostwithquantum"
repository: "quantum-caddy"
token: '{{ requiredEnv "UPDATECLI_GITHUB_TOKEN" }}'
branch: "main"

sources:
cdp:
name: Get latest release
kind: githubrelease
spec:
owner: "lucaslorentz"
repository: "caddy-docker-proxy"
token: '{{ requiredEnv "UPDATECLI_GITHUB_TOKEN" }}'
versionfilter:
kind: latest

targets:
dockerfile:
name: Update Dockerfile ARG CDP_VERSION
kind: dockerfile
scmid: default
sourceid: cdp
spec:
file: Dockerfile
instruction:
keyword: ARG
matcher: CDP_VERSION

actions:
default:
kind: github/pullrequest
scmid: default
title: 'Update caddy-docker-proxy version to {{ source "cdp" }}'
spec:
automerge: false
draft: false
labels:
- dependencies
- enhancement

0 comments on commit cb20ca6

Please sign in to comment.