Bump actions/checkout from 4.1.1 to 4.1.5 #11
Workflow file for this run
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: | |
pull_request: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
workflow_call: | |
inputs: | |
goos: | |
type: string | |
goarch: | |
type: string | |
go: | |
type: string | |
permissions: | |
contents: read | |
env: | |
CGO_ENABLED: 0 | |
GOOS: ${{ inputs.goos || 'linux' }} | |
GOARCH: ${{ inputs.goarch || 'amd64' }} | |
jobs: | |
build: | |
name: Build caddy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ inputs.go || '~1.22.1' }} | |
- name: Build Caddy | |
run: | | |
GOOS=$GOOS GOARCH=$GOARCH go build \ | |
-o "caddy-$GOOS-$GOARCH" | |
- if: env.GOOS == 'linux' && env.GOARCH == 'amd64' | |
name: Show build info | |
run: | | |
./caddy-$GOOS-$GOARCH build-info | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: caddy-${{ env.GOOS }}-${{ env.GOARCH }} | |
path: caddy-${{ env.GOOS }}-${{ env.GOARCH }} |