-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update dependencies * Goreleaser GH action * Add Goreleaser config * Add Goreleaser config * Add Goreleaser config * Add Docker build * Improve GH CI workflow * Add Dockerfile * Add Dockerfile * CI Docker login * Configure Goreleaser * Configure Goreleaser * Configure Goreleaser * Add Brew installation option
- Loading branch information
Showing
8 changed files
with
170 additions
and
31 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
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v5 | ||
|
||
- | ||
name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: $GITHUB_ACTOR | ||
password: ${{ secrets.GH_GORELEASER }} | ||
|
||
- | ||
name: Download Syft | ||
uses: anchore/sbom-action/[email protected] | ||
|
||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v6 | ||
with: | ||
distribution: goreleaser | ||
version: '~> v2' | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_GORELEASER }} |
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 |
---|---|---|
|
@@ -3,6 +3,3 @@ | |
vendor | ||
bin | ||
dist | ||
.goreleaser.yml | ||
|
||
dist/ |
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 |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json | ||
version: 2 | ||
before: | ||
hooks: | ||
# You may remove this if you don't use go modules. | ||
- go mod tidy | ||
universal_binaries: | ||
- replace: true | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
- freebsd | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
ldflags: | ||
- -s -w | ||
- -X main.version={{.Version}} | ||
- -X main.commit={{.ShortCommit}} | ||
- -X main.Date={{.CommitDate}} | ||
|
||
archives: | ||
- format: tar.gz | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
- goos: darwin | ||
format: zip | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
|
||
snapshot: | ||
version_template: "{{ incpatch .Version }}-next" | ||
|
||
changelog: | ||
use: github | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- typo | ||
- Goreleaser | ||
- Dockerfile | ||
- CI | ||
- '^test:' | ||
|
||
sboms: | ||
- artifacts: archive | ||
|
||
nfpms: | ||
- file_name_template: "{{ .ConventionalFileName }}" | ||
formats: | ||
- deb | ||
- rpm | ||
- apk | ||
- archlinux | ||
dependencies: | ||
- "bash" | ||
maintainer: "Peter Teich <[email protected]>" | ||
vendor: "Peter Teich" | ||
homepage: "https://github.com/pteich" | ||
description: "Export Data from ElasticSearch to CSV/JSON using a Lucene Query (e.g. from Kibana) or a raw JSON Query string" | ||
license: "MIT" | ||
|
||
dockers: | ||
- image_templates: ["ghcr.io/pteich/elastic-query-export:{{ .Version }}"] | ||
dockerfile: Dockerfile | ||
build_flag_templates: | ||
- --label=org.opencontainers.image.title={{ .ProjectName }} | ||
- --label=org.opencontainers.image.description={{ .ProjectName }} | ||
- --label=org.opencontainers.image.url=https://github.com/pteich/elastic-query-export | ||
- --label=org.opencontainers.image.source=https://github.com/pteich/elastic-query-export | ||
- --label=org.opencontainers.image.version={{ .Version }} | ||
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }} | ||
- --label=org.opencontainers.image.revision={{ .FullCommit }} | ||
- --label=org.opencontainers.image.licenses=MIT | ||
|
||
brews: | ||
- name: elastic-query-export | ||
homepage: https://github.com/pteich | ||
repository: | ||
owner: pteich | ||
name: homebrew-elastic-query-export | ||
|
||
release: | ||
draft: true | ||
replace_existing_draft: true | ||
replace_existing_artifacts: true |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM alpine:latest | ||
LABEL org.opencontainers.image.source https://github.com/pteich/elastic-query-export | ||
|
||
COPY elastic-query-export /usr/bin/elastic-query-export | ||
|
||
ENTRYPOINT ["/usr/bin/elastic-query-export"] |
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
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
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