Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
df5c3d4
remove drone
xnyo Oct 15, 2025
db6582d
fix non-constant format string error
xnyo Oct 15, 2025
ddf16b1
add ci workflow
xnyo Oct 15, 2025
615ee5c
add release-please
xnyo Oct 15, 2025
506a53a
lint
xnyo Oct 15, 2025
8ea2bf0
fix non-constant format string error
xnyo Oct 15, 2025
364ed8f
lint
xnyo Oct 15, 2025
29f6c8c
Merge branch 'giuseppe/lint' into giuseppe/gha
xnyo Oct 15, 2025
5d30618
make ci a reusable workflow
xnyo Oct 15, 2025
5092196
Merge branch 'main' into giuseppe/gha
xnyo Oct 15, 2025
faec0ba
add names to reusable ci invokations
xnyo Oct 15, 2025
7330fb4
fix mage and golangci-lint versions
xnyo Oct 15, 2025
c929736
add title check job to pr workflow
xnyo Oct 15, 2025
a50c39a
package and upload artifacts
xnyo Oct 15, 2025
52f5814
downgrade Go to 1.24
xnyo Oct 15, 2025
7afc12a
use pr head sha for package step
xnyo Oct 15, 2025
0598e38
add retention days to artifacts
xnyo Oct 15, 2025
8673a7b
attach build artifacts to releases
xnyo Oct 15, 2025
27f2bd9
remove contributing.md
xnyo Oct 15, 2025
7092b2d
remove github targets from magefile
xnyo Oct 15, 2025
a5cc25d
adjust comments
xnyo Oct 15, 2025
b05fd4b
make artifact upload optional
xnyo Oct 15, 2025
68c3efc
force bash
xnyo Oct 15, 2025
4c6d28c
force bash
xnyo Oct 15, 2025
86c223e
rename to dist-artifacts
xnyo Oct 15, 2025
8a86872
rename dist-artifacts
xnyo Oct 15, 2025
bfb1515
refactoring, add version to linker flags
xnyo Oct 15, 2025
dde5c2d
add checkout steps
xnyo Oct 15, 2025
9cc6aca
upload artifacts for testing
xnyo Oct 15, 2025
9d5a8d6
Revert "upload artifacts for testing"
xnyo Oct 15, 2025
035e48a
close .release-please-manifest.json
xnyo Oct 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 0 additions & 55 deletions .drone.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
env:
GO_VERSION: "1.24"
MAGE_VERSION: v1.15.0

runs:
using: composite
steps:
- name: Setup Go
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version: ${{ env.GO_VERSION }}

- name: Install Mage
uses: magefile/mage-action@6f50bbb8ea47d56e62dee92392788acbc8192d0b # v3.1.0
with:
version: ${{ env.MAGE_VERSION }}
install-only: true
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI

on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize
branches:
- main
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

env:
GOLANGCI_LINT_VERSION: v2.5.0

jobs:
lint:
name: Lint
runs-on: ubuntu-arm64-small
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Setup
uses: ./.github/actions/setup
- name: Lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: |
"./..." --timeout=7m

test:
name: Test
runs-on: ubuntu-arm64-small
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Setup
uses: ./.github/actions/setup
- name: Test
run: mage test
shell: bash
22 changes: 22 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: PR checks

on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize
branches:
- main

jobs:
check-pr-title:
name: Check title
permissions:
pull-requests: read
runs-on: ubuntu-arm64-small
steps:
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74 changes: 74 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
on:
push:
branches:
- main

jobs:
release-please:
name: Release Please
runs-on: ubuntu-arm64-small

permissions:
contents: write # Needed to create releases and tags
pull-requests: write # Needed to create release PRs
id-token: write

steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false

- name: Get secrets from Vault
id: get-secrets
uses: grafana/shared-workflows/actions/get-vault-secrets@a37de51f3d713a30a9e4b21bcdfbd38170020593 # get-vault-secrets/v1.3.0
with:
common_secrets: |
GITHUB_APP_ID=plugins-platform-bot-app:app-id
GITHUB_APP_PRIVATE_KEY=plugins-platform-bot-app:private-key
export_env: false

- name: Generate GitHub token
id: generate-github-token
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
with:
app-id: ${{ fromJSON(steps.get-secrets.outputs.secrets).GITHUB_APP_ID }}
private-key: ${{ fromJSON(steps.get-secrets.outputs.secrets).GITHUB_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}

- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit

- name: Release Please
id: release
uses: googleapis/release-please-action@c2a5a2bd6a758a0937f1ddb1e8950609867ed15c # v4.3.0
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
target-branch: ${{ github.ref_name }}
token: ${{ steps.generate-github-token.outputs.token }}

# Whenever there is a new release, build detect-angular-dashboards
# with the new version in the linker fields and attach the build artifacts to the GitHub release.

- name: Setup
if: ${{ steps.release.outputs.release_created }}
uses: ./.github/actions/setup

- name: Build and package all
if: ${{ steps.release.outputs.release_created }}
run: |
mage package "${PACKAGE_NAME}"
env:
PACKAGE_NAME: ${{ steps.release.outputs.version }}

- name: Attach build artifacts to release
if: ${{ steps.release.outputs.release_created }}
run: |
gh release upload "${TAG_NAME}" ./dist/artifacts/${TAG_NAME}/*.zip
shell: bash
env:
GITHUB_TOKEN: ${{ steps.generate-github-token.outputs.token }}
TAG_NAME: ${{ steps.release.outputs.tag_name }}
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.10.0"
}
13 changes: 0 additions & 13 deletions CONTRIBUTING.md

This file was deleted.

Loading