Skip to content

Commit

Permalink
Merge pull request #24 from inovex/static
Browse files Browse the repository at this point in the history
Use GCO_ENABLED=0 to produce a static binary
  • Loading branch information
frittentheke authored Feb 12, 2025
2 parents 9c5a7a3 + 8a38adb commit 7093ed3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/devstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:
uses: actions/checkout@v4
with:
repository: openstack/devstack
ref: 'stable/2024.2'
ref: "stable/2024.2"
path: ./devstack

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.x'
go-version: "1.23.x"
cache-dependency-path: |
./go.sum
./external-dns/go.sum
Expand Down
43 changes: 21 additions & 22 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Build, Test and Release Binaries
on:
push
on: push

permissions:
contents: write
Expand Down Expand Up @@ -31,24 +30,24 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x
- name: Checkout Repository
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x

- name: Run Goreleaser
if: ${{ github.event_name != 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
args: release --clean
- name: Run Goreleaser
if: ${{ github.event_name != 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: goreleaser/goreleaser-action@v6
with:
version: "~> v2"
args: release --clean
4 changes: 2 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ builds:
dir: .
main: ./cmd/webhook/
binary: external-dns-openstack-webhook
env:
- CGO_ENABLED=0 # build a static binary without C dependencies
flags:
- -tags=netgo
- -v
- -a
ldflags:
- -w -s
- -X main.version={{ .Version }} -X main.commit={{ .Commit }}
goos:
- darwin
Expand Down

0 comments on commit 7093ed3

Please sign in to comment.