Adapt documentation for current forwardproxy version (#5) #18
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
name: Build | |
on: | |
push: | |
branches: [naive] | |
paths-ignore: [README.md] | |
release: | |
types: [published] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build_caddy_with_naive: | |
runs-on: ubuntu-22.04 | |
env: | |
BUNDLE: caddy-forwardproxy-naive | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ^1.21.3 | |
- run: go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest | |
- run: ~/go/bin/xcaddy build --with github.com/caddyserver/forwardproxy@master=$PWD | |
- name: Pack naiveproxy assets | |
run: | | |
mkdir ${{ env.BUNDLE }} | |
cp caddy LICENSE README.md ${{ env.BUNDLE }} | |
tar cJf ${{ env.BUNDLE }}.tar.xz ${{ env.BUNDLE }} | |
openssl sha256 ./caddy >sha256sum.txt | |
echo "SHA256SUM=$(cut -d' ' -f2 sha256sum.txt)" >>$GITHUB_ENV | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.BUNDLE }}.tar.xz caddy executable sha256 ${{ env.SHA256SUM }} | |
path: sha256sum.txt | |
- name: Upload caddy assets | |
if: ${{ github.event_name == 'release' }} | |
run: gh release upload "${GITHUB_REF##*/}" ${{ env.BUNDLE }}.tar.xz --clobber | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |