Skip to content

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
Bump github/codeql-action from 2 to 3

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Bump golang.org/x/crypto from 0.16.0 to 0.17.0

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.16.0 to 0.17.0.
- [Commits](golang/crypto@v0.16.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Updates to support running in docker

Support hole punching for containerized envs

chore: upgraded deps

Remove codeql analysis action for now

Bump github.com/libsv/go-p2p from 0.1.4 to 0.1.5

Bumps [github.com/libsv/go-p2p](https://github.com/libsv/go-p2p) from 0.1.4 to 0.1.5.
- [Commits](libsv/go-p2p@v0.1.4...v0.1.5)

---
updated-dependencies:
- dependency-name: github.com/libsv/go-p2p
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

chore: upgraded deps

chore: fixed repo name and owner

update: bench now runs on all files

chore: upgraded deps, added viper

chore: added benchmarks and examples

feat: config refactor to use viper

feat: basic readme to start enhancing

chore: fixing badges

chore: minor update on badge

feat: added line for config file location

bug: fixing link to license

fix: changed description line

chore(deps): bump github.com/99designs/gqlgen from 0.17.41 to 0.17.42

Bumps [github.com/99designs/gqlgen](https://github.com/99designs/gqlgen) from 0.17.41 to 0.17.42.
- [Release notes](https://github.com/99designs/gqlgen/releases)
- [Changelog](https://github.com/99designs/gqlgen/blob/master/CHANGELOG.md)
- [Commits](99designs/gqlgen@v0.17.41...v0.17.42)

---
updated-dependencies:
- dependency-name: github.com/99designs/gqlgen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

chore(deps): bump github.com/mrz1836/go-datastore from 0.5.8 to 0.5.9

Bumps [github.com/mrz1836/go-datastore](https://github.com/mrz1836/go-datastore) from 0.5.8 to 0.5.9.
- [Release notes](https://github.com/mrz1836/go-datastore/releases)
- [Changelog](https://github.com/mrz1836/go-datastore/blob/master/.goreleaser.yml)
- [Commits](mrz1836/go-datastore@v0.5.8...v0.5.9)

---
updated-dependencies:
- dependency-name: github.com/mrz1836/go-datastore
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Fix configuration reading of database file

chore(deps): bump github.com/ordishs/gocore from 1.0.54 to 1.0.55

Bumps [github.com/ordishs/gocore](https://github.com/ordishs/gocore) from 1.0.54 to 1.0.55.
- [Commits](ordishs/gocore@v1.0.54...v1.0.55)

---
updated-dependencies:
- dependency-name: github.com/ordishs/gocore
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

chore(deps): bump github.com/libsv/go-p2p from 0.1.5 to 0.1.6

Bumps [github.com/libsv/go-p2p](https://github.com/libsv/go-p2p) from 0.1.5 to 0.1.6.
- [Commits](libsv/go-p2p@v0.1.5...v0.1.6)

---
updated-dependencies:
- dependency-name: github.com/libsv/go-p2p
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

chore(deps): bump github.com/multiformats/go-multiaddr

Bumps [github.com/multiformats/go-multiaddr](https://github.com/multiformats/go-multiaddr) from 0.12.0 to 0.12.1.
- [Release notes](https://github.com/multiformats/go-multiaddr/releases)
- [Commits](multiformats/go-multiaddr@v0.12.0...v0.12.1)

---
updated-dependencies:
- dependency-name: github.com/multiformats/go-multiaddr
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

chore(deps): bump github.com/ordishs/gocore from 1.0.55 to 1.0.57

Bumps [github.com/ordishs/gocore](https://github.com/ordishs/gocore) from 1.0.55 to 1.0.57.
- [Commits](ordishs/gocore@v1.0.55...v1.0.57)

---
updated-dependencies:
- dependency-name: github.com/ordishs/gocore
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Add support for freezing and confiscation (#12)

* Support for confiscation

* Freezing is working

* Fixes for linter

* Fix go mod

Make p2p topic name configurable

Don't fail on unprocessed alerts

Include default alert_system topic in config

Update kubernetes files and include image workflow

chore(deps): bump github.com/99designs/gqlgen from 0.17.42 to 0.17.43

Bumps [github.com/99designs/gqlgen](https://github.com/99designs/gqlgen) from 0.17.42 to 0.17.43.
- [Release notes](https://github.com/99designs/gqlgen/releases)
- [Changelog](https://github.com/99designs/gqlgen/blob/master/CHANGELOG.md)
- [Commits](99designs/gqlgen@v0.17.42...v0.17.43)

---
updated-dependencies:
- dependency-name: github.com/99designs/gqlgen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Fix image workflow

Change actions for multi-platform support

chore(deps): bump github.com/mrz1836/go-datastore from 0.5.9 to 0.5.10

Bumps [github.com/mrz1836/go-datastore](https://github.com/mrz1836/go-datastore) from 0.5.9 to 0.5.10.
- [Release notes](https://github.com/mrz1836/go-datastore/releases)
- [Changelog](https://github.com/mrz1836/go-datastore/blob/master/.goreleaser.yml)
- [Commits](mrz1836/go-datastore@v0.5.9...v0.5.10)

---
updated-dependencies:
- dependency-name: github.com/mrz1836/go-datastore
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

chore(deps): bump actions/setup-go from 3 to 5

Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@v3...v5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

chore(deps): bump actions/cache from 3 to 4

Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Make peer discovery a constant process (#18)

* Make peer discovery a constant process

* Fix config

* Fix comments

Make invalidate block run on sync

chore(deps): bump github.com/libsv/go-p2p from 0.1.6 to 0.1.7

Bumps [github.com/libsv/go-p2p](https://github.com/libsv/go-p2p) from 0.1.6 to 0.1.7.
- [Commits](libsv/go-p2p@v0.1.6...v0.1.7)

---
updated-dependencies:
- dependency-name: github.com/libsv/go-p2p
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Update logging of connection details

Add STN environment

chore(deps): bump github.com/libsv/go-p2p from 0.1.7 to 0.1.8

Bumps [github.com/libsv/go-p2p](https://github.com/libsv/go-p2p) from 0.1.7 to 0.1.8.
- [Commits](libsv/go-p2p@v0.1.7...v0.1.8)

---
updated-dependencies:
- dependency-name: github.com/libsv/go-p2p
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Process all alerts on sync

Add timeout to sync process (#25)

chore(deps): bump github.com/libsv/go-p2p from 0.1.8 to 0.1.9

Bumps [github.com/libsv/go-p2p](https://github.com/libsv/go-p2p) from 0.1.8 to 0.1.9.
- [Commits](libsv/go-p2p@v0.1.8...v0.1.9)

---
updated-dependencies:
- dependency-name: github.com/libsv/go-p2p
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

chore(deps): bump github.com/mrz1836/go-datastore from 0.5.10 to 0.5.11

Bumps [github.com/mrz1836/go-datastore](https://github.com/mrz1836/go-datastore) from 0.5.10 to 0.5.11.
- [Release notes](https://github.com/mrz1836/go-datastore/releases)
- [Changelog](https://github.com/mrz1836/go-datastore/blob/master/.goreleaser.yml)
- [Commits](mrz1836/go-datastore@v0.5.10...v0.5.11)

---
updated-dependencies:
- dependency-name: github.com/mrz1836/go-datastore
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

chore(deps): bump github.com/multiformats/go-multiaddr

Bumps [github.com/multiformats/go-multiaddr](https://github.com/multiformats/go-multiaddr) from 0.12.1 to 0.12.2.
- [Release notes](https://github.com/multiformats/go-multiaddr/releases)
- [Commits](multiformats/go-multiaddr@v0.12.1...v0.12.2)

---
updated-dependencies:
- dependency-name: github.com/multiformats/go-multiaddr
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

chore(deps): bump github.com/mrz1836/go-api-router from 0.7.0 to 0.7.1

Bumps [github.com/mrz1836/go-api-router](https://github.com/mrz1836/go-api-router) from 0.7.0 to 0.7.1.
- [Release notes](https://github.com/mrz1836/go-api-router/releases)
- [Changelog](https://github.com/mrz1836/go-api-router/blob/master/.goreleaser.yml)
- [Commits](mrz1836/go-api-router@v0.7.0...v0.7.1)

---
updated-dependencies:
- dependency-name: github.com/mrz1836/go-api-router
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Add alert processing retry cron (#31)

* Add alert processing retry cron

* Fix ReadRaw func

Move connection wait

chore(deps): bump github.com/mrz1836/go-datastore from 0.5.11 to 0.5.12

Bumps [github.com/mrz1836/go-datastore](https://github.com/mrz1836/go-datastore) from 0.5.11 to 0.5.12.
- [Release notes](https://github.com/mrz1836/go-datastore/releases)
- [Changelog](https://github.com/mrz1836/go-datastore/blob/master/.goreleaser.yml)
- [Commits](mrz1836/go-datastore@v0.5.11...v0.5.12)

---
updated-dependencies:
- dependency-name: github.com/mrz1836/go-datastore
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Changes to support confiscation

Fix CI system for confiscation

Add basic status page

Add support for unfreeze

Clean up webhook message

Upgraded deps

First attempt at creating binaries on release

Enabled CGO, added a few more config settings

Fix deprecated notice on goreleaser

Path to the main.go file

Attempt to add flags for cgo

Fix the flags

Disable darwin for now until linux works

Remove flags for now

Attempt to turn CGO off for now

Attempt to fix the archive issue

Some more formatting for webhook messages

Add basic config

Disable webhook tests for now since DB calls are made

chore(deps): bump gorm.io/gorm from 1.25.6 to 1.25.7

Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.25.6 to 1.25.7.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](go-gorm/gorm@v1.25.6...v1.25.7)

---
updated-dependencies:
- dependency-name: gorm.io/gorm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

chore(deps): bump gorm.io/driver/sqlite from 1.5.4 to 1.5.5

Bumps [gorm.io/driver/sqlite](https://github.com/go-gorm/sqlite) from 1.5.4 to 1.5.5.
- [Commits](go-gorm/sqlite@v1.5.4...v1.5.5)

---
updated-dependencies:
- dependency-name: gorm.io/driver/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

feat: Add support for reading bitcoin configuration file (#40)

Move to a new topic for STN

chore(deps): bump github.com/mrz1836/go-datastore from 0.5.12 to 0.5.13

Bumps [github.com/mrz1836/go-datastore](https://github.com/mrz1836/go-datastore) from 0.5.12 to 0.5.13.
- [Release notes](https://github.com/mrz1836/go-datastore/releases)
- [Changelog](https://github.com/mrz1836/go-datastore/blob/master/.goreleaser.yml)
- [Commits](mrz1836/go-datastore@v0.5.12...v0.5.13)

---
updated-dependencies:
- dependency-name: github.com/mrz1836/go-datastore
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Error out if RPC credentials aren't valid (#44)

Implement quit channel for dht initialization (#45)

* Implement quit channel for dht initialization

* More graceful shutdowns

Add more readable alerts to API

Enable support for disabling RPC verification and writing to a log file (#46)

* Remove gocore logger

* Updates to fix CI

* Fix linter

Update dependencies

Feature: Build binaries and automatically create release on Tag creation (#47)

* chore: updated linter version

* chore: upgraded deps

* fix: linter issues after upgrading

* feat: build binaries on release, adding tag

* fix: install cross compilation for ARM64

* fix: add new flags for compilation

* fix: turn off arm64 for testing

* fix: trying another version of build configurations

* fix: replaced name, need to test

* chore: minor formatting and spelling fix

* fix: for windows path, suggestion from copilot

* fix: attempt to build with cgo enabled

* fix: adding cache to speed up runs

* fix: removing additional vars

* test: working on linux only release

* fix: for yaml linter

* fix: file extension does not match

* fix: names, tags, deprecated fields

* fix: add changelog and checksums

* feat: added darwin binary

* fix: for removing gcc from darwin

* fix: attempt to fix a perm issue on installing golangci

* fix: add more logging to lint install

* fix: set the gopath env

* fix: attempt to overwrite go if detected

* fix: working on safer brew execution

* fix: only run one install

* chore: cleanup of files

* chore: cleanup old code

* fix: added more timeout to linting

* fix: only install if needed

* fix: improved lint function

* fix: make the ids unique
  • Loading branch information
galt-tr committed Feb 15, 2024
1 parent 84ba411 commit b1e271b
Show file tree
Hide file tree
Showing 77 changed files with 3,146 additions and 1,327 deletions.
38 changes: 0 additions & 38 deletions .all-contributorsrc

This file was deleted.

2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Default is the repo owner
* @galt-tr
* @bitcoin-sv
3 changes: 1 addition & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# These are supported funding model platforms

github: galt-tr
#custom: https://mrz1818.com/?tab=tips&utm_source=github&utm_medium=sponsor-link&utm_campaign=go-template&utm_term=go-template&utm_content=go-template
github: bitcoin-sv
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Ask a question
url: https://github.com/galt-tr/alert-key-p2p/discussions
url: https://github.com/bitcoin-sv/alert-system/discussions
about: Ask questions and discuss with other community members
71 changes: 0 additions & 71 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build and push OCI image to Docker Hub

on:
push:
tags:
- '*'

jobs:
image:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "./go.mod"

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: bsvb/alert-key

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
116 changes: 109 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: release

env:
GO111MODULE: on
GO_VERSION: 1.21

on:
push:
Expand All @@ -13,24 +14,125 @@ permissions:
contents: write

jobs:
goreleaser:
build-linux-binary:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: gcc install
run: sudo apt-get update; sudo apt install gcc-aarch64-linux-gnu
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: ${{ env.GO_VERSION }}
- name: Cache code
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod # Module download cache
~/.cache/go-build # Build cache (Linux)
~/Library/Caches/go-build # Build cache (Mac)
"%LocalAppData%\\go-build" # Build cache (Windows)
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5.0.0
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser
version: latest
args: release --rm-dist --debug
args: release --skip=publish --verbose --config .goreleaser-for-linux.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#- name: Syndicate to GoDocs
# run: make godocs
- name: Upload
uses: actions/upload-artifact@v4
with:
name: alert_system_linux
path: |
dist/alert_system_*.zip
dist/checksums.txt
dist/CHANGELOG.md
build-darwin-binary:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Cache code
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod # Module download cache
~/.cache/go-build # Build cache (Linux)
~/Library/Caches/go-build # Build cache (Mac)
"%LocalAppData%\\go-build" # Build cache (Windows)
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --skip=publish --verbose --config .goreleaser-for-darwin.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload
uses: actions/upload-artifact@v4
with:
name: alert_system_darwin
path: |
dist/alert_system_*.zip
dist/checksums.txt
dist/CHANGELOG.md
create-release:
needs: [build-linux-binary, build-darwin-binary]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Make directories
run: |
mkdir -p ./dist/linux
mkdir -p ./dist/darwin
mkdir -p ./dist/windows
- name: Download linux binaries
uses: actions/download-artifact@v4
with:
name: alert_system_linux
path: ./tmp-build/linux
- name: Download darwin binaries
uses: actions/download-artifact@v4
with:
name: alert_system_darwin
path: ./tmp-build/darwin
- name: Get tag
uses: little-core-labs/get-git-tag@v3.0.2
id: tag
- name: Prepare ./dist folder
run: |
mkdir -p ./dist
mv ./tmp-build/linux/*.zip ./dist
mv ./tmp-build/darwin/*.zip ./dist
cat ./tmp-build/linux/checksums.txt >> ./dist/checksums.txt
cat ./tmp-build/linux/CHANGELOG.md >> ./dist/CHANGELOG.md
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: dist/CHANGELOG.md
prerelease: ${{ contains(github.ref, '-rc.') }}
files: |
dist/*.zip
dist/CHANGELOG.md
env:
COMMIT_TAG: ${{steps.tag.outputs.tag}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache code
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod # Module download cache
~/.cache/go-build # Build cache (Linux)
~/Library/Caches/go-build # Build cache (Mac)
'%LocalAppData%\go-build' # Build cache (Windows)
"%LocalAppData%\\go-build" # Build cache (Windows)
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ run:
concurrency: 4

# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 6m
timeout: 10m

# exit code when at least one issue was found, default is 1
issues-exit-code: 1
Expand Down
Loading

0 comments on commit b1e271b

Please sign in to comment.