forked from cosmos/gex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gex full refactor Co-authored-by: Pantani <Pantani>
- Loading branch information
Showing
44 changed files
with
4,377 additions
and
1,148 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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,9 @@ | ||
# CODEOWNERS: https://help.github.com/articles/about-codeowners/ | ||
|
||
# Primary repo maintainers | ||
* @ilgooz @jeronimoalbi @Pantani @julienrbrt | ||
|
||
# Docs | ||
*.md @salmad3 @toschdev @ilgooz | ||
docs/* @salmad3 @toschdev @ilgooz | ||
changelog.md @ilgooz @salmad3 @toschdev @jeronimoalbi @Pantani @julienrbrt |
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,33 @@ | ||
coverage: | ||
precision: 2 | ||
round: down | ||
range: 70...100 | ||
status: | ||
project: | ||
default: | ||
target: auto | ||
threshold: 10% | ||
informational: true | ||
patch: | ||
default: | ||
informational: true | ||
|
||
comment: | ||
layout: "reach, diff, files" | ||
behavior: default | ||
require_changes: true | ||
|
||
codecov: | ||
notify: | ||
wait_for_ci: false | ||
|
||
ignore: | ||
- "*.pb.go" | ||
- "*.pb.gw.go" | ||
- "*.md" | ||
- "*.ts" | ||
- "actions/" | ||
- "assets/" | ||
- "docs/" | ||
- "integration/" | ||
- "scripts/" |
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,24 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "daily" | ||
time: "10:00" | ||
labels: | ||
- "dependencies" | ||
- "component:go" | ||
- "skip-changelog" | ||
open-pull-requests-limit: 0 | ||
|
||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "10:00" | ||
open-pull-requests-limit: 0 |
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,18 @@ | ||
name: auto-author-assign | ||
|
||
on: | ||
pull_request_target: | ||
types: [ opened, reopened ] | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
assign-author: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: toshimaru/[email protected] |
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,19 @@ | ||
name: Changelog Enforcer | ||
on: | ||
pull_request: | ||
# The specific activity types are listed here to include "labeled" and "unlabeled" | ||
# (which are not included by default for the "pull_request" trigger). | ||
# This is needed to allow skipping enforcement of the changelog in PRs with specific labels, | ||
# as defined in the (optional) "skipLabels" property. | ||
types: [ opened, synchronize, reopened, ready_for_review, labeled, unlabeled ] | ||
|
||
jobs: | ||
changelog: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: dangoslen/changelog-enforcer@v3 | ||
with: | ||
changeLogPath: 'changelog.md' | ||
missingUpdateErrorMessage: 'Please add an entry to the changelog.md file or add the "skip-changelog" label' | ||
skipLabels: 'skip-changelog' | ||
versionPattern: '' |
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,29 @@ | ||
name: Go formatting | ||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- '**.go' | ||
|
||
jobs: | ||
go-formatting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' | ||
|
||
- name: Run make format | ||
run: make format | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
title: "chore: go formatting" | ||
commit-message: "chore: go formatting" | ||
body: "" | ||
branch: chore/go-formatting |
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,16 @@ | ||
name: Janitor | ||
# Janitor cleans up previous runs that are not completed for a given workflow | ||
# It cancels Sims and Tests | ||
# Reference the API https://api.github.com/repos/:org/:repo/actions/workflows to find workflow ids | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
cancel: | ||
name: "Cancel Previous Runs" | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
steps: | ||
- uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} |
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,38 @@ | ||
name: Release Binaries | ||
|
||
on: | ||
release: | ||
types: [ published ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
binary: | ||
runs-on: ubuntu-latest | ||
env: | ||
working-directory: go/src/github.com/ignite/gex | ||
|
||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.22" | ||
cache: true | ||
cache-dependency-path: go.sum | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ${{ env.working-directory }} | ||
fetch-depth: 0 | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
workdir: ${{ env.working-directory }} | ||
version: 1.13.0 | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,73 @@ | ||
name: Release Docker Image | ||
|
||
on: | ||
release: | ||
types: [ published ] | ||
schedule: | ||
- cron: "0 0 * * *" # every day at midnight | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
consecutiveness: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: ignite/consecutive-workflow-action@main | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
check-latest-run: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: octokit/[email protected] | ||
id: check_last_run | ||
with: | ||
route: GET /repos/${{github.repository}}/actions/workflows/release-docker.yml/runs?per_page=1&status=completed | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
outputs: | ||
last_sha: ${{ fromJson(steps.check_last_run.outputs.data).workflow_runs[0].head_sha }} | ||
|
||
docker: | ||
name: Push Docker image to Docker Hub | ||
if: needs.check-latest-run.outputs.last_sha != github.sha | ||
runs-on: ubuntu-latest | ||
needs: [ consecutiveness, check-latest-run ] | ||
|
||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ignitehq/gex | ||
# push to ignitehq/gex:latest on every push to master | ||
# push to ignitehq/gex:vx.x.x on every release published | ||
tags: | | ||
type=raw,value=latest | ||
type=semver,pattern=v{{version}} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: true | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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,85 @@ | ||
name: Release nightly | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" # every day at midnight | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
consecutiveness: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: ignite/consecutive-workflow-action@main | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
check-latest-run: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: octokit/[email protected] | ||
id: check_last_run | ||
with: | ||
route: GET /repos/${{github.repository}}/actions/workflows/release-nightly.yml/runs?per_page=1&status=completed | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
outputs: | ||
last_sha: ${{ fromJson(steps.check_last_run.outputs.data).workflow_runs[0].head_sha }} | ||
|
||
release-nightly: | ||
if: needs.check-latest-run.outputs.last_sha != github.sha | ||
runs-on: ubuntu-latest | ||
needs: [ consecutiveness, check-latest-run ] | ||
env: | ||
working-directory: go/src/github.com/ignite/gex | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Delete the nightly release | ||
uses: dev-drprasad/[email protected] | ||
with: | ||
tag_name: nightly | ||
delete_release: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push new nightly tag | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
custom_tag: nightly | ||
tag_prefix: "" | ||
|
||
- name: Create the new nightly release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: nightly | ||
name: nightly | ||
prerelease: true | ||
|
||
releases-binaries: | ||
if: needs.check-latest-run.outputs.last_sha != github.sha | ||
name: Release Go Binary | ||
needs: [ consecutiveness, check-latest-run ] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
goos: [ linux, darwin ] | ||
goarch: [ amd64, arm64 ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: wangyoucao577/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
project_path: "." | ||
binary_name: "gex" | ||
asset_name: gex-nightly-${{ matrix.goos }}-${{ matrix.goarch }} | ||
release_name: "nightly" | ||
goos: ${{ matrix.goos }} | ||
goarch: ${{ matrix.goarch }} | ||
ldflags: -s -w -X github.com/ignite/gex/version.Version=nightly | ||
retry: 10 |
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,17 @@ | ||
on: | ||
schedule: | ||
# Run this once per day, towards the end of the day for keeping the most | ||
# recent data point most meaningful (hours are interpreted in UTC). | ||
- cron: "0 23 * * *" | ||
workflow_dispatch: # Allow for running this manually. | ||
|
||
jobs: | ||
j1: | ||
name: Gex Repository Statistics | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: run-ghrs | ||
uses: jgehrcke/[email protected] | ||
with: | ||
ghtoken: ${{ secrets.ghrs_github_api_token }} | ||
|
Oops, something went wrong.