-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
75a79b4
commit 7a63d59
Showing
1 changed file
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,9 @@ name: Build | |
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
workflow_call: | ||
inputs: | ||
|
@@ -24,22 +27,35 @@ jobs: | |
build: | ||
name: Build caddy | ||
runs-on: ubuntu-latest | ||
permissions: {} | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
path: caddy-umami | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ inputs.go || '~1.22.1' }} | ||
|
||
- name: Build Caddy | ||
- name: Install xcaddy | ||
run: | | ||
wget https://github.com/caddyserver/xcaddy/releases/download/v${{ env.XCADDY_VERSION }}/xcaddy_${{ env.XCADDY_VERSION }}_linux_amd64.tar.gz | ||
tar -xzvf xcaddy_${{ env.XCADDY_VERSION }}_linux_amd64.tar.gz | ||
- name: Build Caddy | ||
run: | | ||
GOOS=$GOOS GOARCH=$GOARCH ./xcaddy build \ | ||
--with github.com/${{ github.repository }}@${{ github.ref_name}} \ | ||
--with github.com/jonaharagon/caddy-umami=./caddy-umami \ | ||
--with github.com/caddyserver/cache-handler \ | ||
--with github.com/digilolnet/caddy-bunny-ip \ | ||
--output "caddy-$GOOS-$GOARCH" | ||
- name: Show build info | ||
run: | | ||
./caddy-$GOOS-$GOARCH build-info | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
|