Skip to content

Commit

Permalink
Build local repo in PR
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaharagon committed Apr 2, 2024
1 parent 75a79b4 commit 7a63d59
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Build

on:
pull_request:
push:
branches:
- main
workflow_dispatch:
workflow_call:
inputs:
Expand All @@ -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
Expand Down

0 comments on commit 7a63d59

Please sign in to comment.