Skip to content

Commit

Permalink
chore: update to last taskfile and integrate vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
merlindorin committed Jul 25, 2024
1 parent 3579884 commit 00a6e0b
Show file tree
Hide file tree
Showing 1,133 changed files with 480,413 additions and 7 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# THIS FILE HAS BEEN GENERATED BY THE COMMAND `goreleaser:ci`; DO NOT EDIT;
#
# Releaser workflow setup
# https://goreleaser.com/ci/actions/
#
name: release

# run only on tags
on:
push:
tags:
- 'v*'

permissions:
contents: write # needed to write releases
id-token: write # needed for keyless signing
packages: write # needed for ghcr access

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # this is important, otherwise it won't checkout the full tree (i.e. no previous tags)
- uses: actions/setup-go@v4
with:
go-version: 1.21
cache: true
- uses: sigstore/[email protected] # installs cosign
- uses: anchore/sbom-action/[email protected] # installs syft
- uses: docker/login-action@v3 # login to ghcr
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: goreleaser/goreleaser-action@v5 # run goreleaser
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

21 changes: 21 additions & 0 deletions .github/workflows/trufflehog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# THIS FILE HAS BEEN GENERATED BY THE COMMAND `trufflehog:ci`; DO NOT EDIT;
name: trufflehog
on:
pull_request:
push:
workflow_dispatch:
schedule:
- cron: "0 4 * * *" # run once a day at 4 AM

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Secret Scanning
uses: trufflesecurity/trufflehog@main
with:
extra_args: --only-verified
5 changes: 3 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# THIS FILE HAS BEEN GENERATED BY THE COMMAND `goreleaser:boilerplate`; DO NOT EDIT;
# See also: .github/workflows/release.yml

project_name: exporter-unifi-protect
Expand Down Expand Up @@ -80,7 +81,7 @@ dockers:
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.description=Prometheus exporter designed to help monitor your UniFi Protect setup by exporting relevant metrics to Prometheus"
- "--label=org.opencontainers.image.description=Exporter for UniFi Protect is a Prometheus exporter designed to help monitor your UniFi Protect setup by exporting relevant metrics to Prometheus."
- "--label=org.opencontainers.image.source=https://github.com/hoomy-official/exporter-unifi-protect"

# signs our docker image
Expand All @@ -94,4 +95,4 @@ docker_signs:
args:
- 'sign'
- '${artifact}'
- "--yes" # needed on cosign 2.0.0+
- "--yes" # needed on cosign 2.0.0+
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ COPY exporter-unifi-protect /usr/bin/exporter-unifi-protect

ENTRYPOINT [ "/usr/bin/exporter-unifi-protect" ]

CMD ["serve"]
CMD ["serve"]

9 changes: 9 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
NAME=exporter-unifi-protect
DISPLAY_NAME=unofficial Unifi Protect Exporter
DESCRIPTION=Exporter for UniFi Protect is a Prometheus exporter designed to help monitor your UniFi Protect setup by exporting relevant metrics to Prometheus.
SOURCE=https://github.com/hoomy-official/exporter-unifi-protect

GITHUB_OWNER=hoomy-official
GITHUB_REPOSITORY=exporter-unifi-protect

DOCKER_REGISTRY=ghcr.io/hoomy-official/exporter-unifi-protect
12 changes: 8 additions & 4 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ vars:
MARKDOWNLINT_ARGS: "--ignore=./dist README.md"

includes:
default: https://raw.githubusercontent.com/hoomy-official/taskfile-default/main/tasks.yaml
git: https://raw.githubusercontent.com/hoomy-official/taskfile-git/main/tasks.yaml
markdownlint: https://raw.githubusercontent.com/hoomy-official/taskfile-markdownlint/main/tasks.yaml
golangci: https://raw.githubusercontent.com/hoomy-official/taskfile-golangci/main/tasks.yaml
default: https://raw.githubusercontent.com/vanyda-official/taskfile-default/main/tasks.yaml
git: https://raw.githubusercontent.com/vanyda-official/taskfile-git/main/tasks.yaml
markdownlint: https://raw.githubusercontent.com/vanyda-official/taskfile-markdownlint/main/tasks.yaml
golangci: https://raw.githubusercontent.com/vanyda-official/taskfile-golangci/main/tasks.yaml
goreleaser: https://raw.githubusercontent.com/vanyda-official/taskfile-goreleaser/main/tasks.yaml
trufflehog: https://raw.githubusercontent.com/vanyda-official/taskfile-trufflehog/main/tasks.yaml


dotenv:
- .env
- PROJECT
- .env.default
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.21.7

require (
github.com/alecthomas/kong v0.8.1
github.com/alecthomas/kong-yaml v0.2.0
github.com/hoomy-official/go-shared v0.0.0-20240302121620-6c18a355f8e4
github.com/hoomy-official/go-unifi-protect v0.0.0-20240228010302-67430585a319
github.com/prometheus/client_golang v1.19.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ github.com/alecthomas/assert/v2 v2.1.0 h1:tbredtNcQnoSd3QBhQWI7QZ3XHOVkw1Moklp2o
github.com/alecthomas/assert/v2 v2.1.0/go.mod h1:b/+1DI2Q6NckYi+3mXyH3wFb8qG37K/DuK80n7WefXA=
github.com/alecthomas/kong v0.8.1 h1:acZdn3m4lLRobeh3Zi2S2EpnXTd1mOL6U7xVml+vfkY=
github.com/alecthomas/kong v0.8.1/go.mod h1:n1iCIO2xS46oE8ZfYCNDqdR0b0wZNrXAIAqro/2132U=
github.com/alecthomas/kong-yaml v0.2.0 h1:iiVVqVttmOsHKawlaW/TljPsjaEv1O4ODx6dloSA58Y=
github.com/alecthomas/kong-yaml v0.2.0/go.mod h1:vMvOIy+wpB49MCZ0TA3KMts38Mu9YfRP03Q1StN69/g=
github.com/alecthomas/repr v0.1.0 h1:ENn2e1+J3k09gyj2shc0dHr/yjaWSHRlrJ4DPMevDqE=
github.com/alecthomas/repr v0.1.0/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
Expand Down
90 changes: 90 additions & 0 deletions vendor/github.com/alecthomas/kong-yaml/.golangci.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions vendor/github.com/alecthomas/kong-yaml/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions vendor/github.com/alecthomas/kong-yaml/mapper.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions vendor/github.com/alecthomas/kong-yaml/yaml.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/github.com/alecthomas/kong/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 00a6e0b

Please sign in to comment.