ci: consolidate duplicate workflows and merge CodeQL configs
Remove 17 duplicate workflow files that were split copies of the combined originals. Each family (CI, CodeQL, Coverage, PR Build, Alpha Release) had the same job duplicated across separate push/pull_request/schedule/manual trigger files. Merge codeql.yml and codescan.yml into a single codeql.yml with a language matrix covering go, javascript-typescript, python, and actions — matching the previous default setup coverage. Remaining workflows (one per family): - ci.yml (push + PR + manual) - codeql.yml (push + PR + schedule, all languages) - coverage.yml (push + PR + manual) - alpha-release.yml (push + manual) - pr-build.yml (PR + manual) - release.yml (tag push) - agent-verify.yml, auto-label.yml, auto-project.yml Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
ee21150eac
commit
bbd793bd51
18 changed files with 8 additions and 854 deletions
92
.github/workflows/alpha-release-manual.yml
vendored
92
.github/workflows/alpha-release-manual.yml
vendored
|
|
@ -1,92 +0,0 @@
|
||||||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
|
|
||||||
name: "Alpha Release: Manual"
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
id-token: write
|
|
||||||
attestations: write
|
|
||||||
|
|
||||||
env:
|
|
||||||
NEXT_VERSION: "0.0.4"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: ubuntu-latest
|
|
||||||
platform: linux/amd64
|
|
||||||
- os: ubuntu-latest
|
|
||||||
platform: linux/arm64
|
|
||||||
- os: macos-latest
|
|
||||||
platform: darwin/universal
|
|
||||||
- os: windows-latest
|
|
||||||
platform: windows/amd64
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
uses: host-uk/build@v3
|
|
||||||
with:
|
|
||||||
build-name: core
|
|
||||||
build-platform: ${{ matrix.platform }}
|
|
||||||
build: true
|
|
||||||
package: true
|
|
||||||
sign: false
|
|
||||||
|
|
||||||
release:
|
|
||||||
needs: build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Download artifacts
|
|
||||||
uses: actions/download-artifact@v7
|
|
||||||
with:
|
|
||||||
path: dist
|
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: Prepare release files
|
|
||||||
run: |
|
|
||||||
mkdir -p release
|
|
||||||
cp dist/* release/ 2>/dev/null || true
|
|
||||||
ls -la release/
|
|
||||||
|
|
||||||
- name: Create alpha release
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
VERSION="v${{ env.NEXT_VERSION }}-alpha.${{ github.run_number }}"
|
|
||||||
|
|
||||||
gh release create "$VERSION" \
|
|
||||||
--title "Alpha: $VERSION" \
|
|
||||||
--notes "Canary build from dev branch.
|
|
||||||
|
|
||||||
**Version:** $VERSION
|
|
||||||
**Commit:** ${{ github.sha }}
|
|
||||||
**Built:** $(date -u +'%Y-%m-%d %H:%M:%S UTC')
|
|
||||||
**Run:** ${{ github.run_id }}
|
|
||||||
|
|
||||||
## Channel: Alpha (Canary)
|
|
||||||
|
|
||||||
This is an automated pre-release for early testing.
|
|
||||||
|
|
||||||
- Systems and early adopters can test breaking changes
|
|
||||||
- Quality scoring determines promotion to beta
|
|
||||||
- Use stable releases for production
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
\`\`\`bash
|
|
||||||
# macOS/Linux
|
|
||||||
curl -fsSL https://github.com/host-uk/core/releases/download/$VERSION/core-linux-amd64 -o core
|
|
||||||
chmod +x core && sudo mv core /usr/local/bin/
|
|
||||||
\`\`\`
|
|
||||||
" \
|
|
||||||
--prerelease \
|
|
||||||
--target dev \
|
|
||||||
release/*
|
|
||||||
93
.github/workflows/alpha-release-push.yml
vendored
93
.github/workflows/alpha-release-push.yml
vendored
|
|
@ -1,93 +0,0 @@
|
||||||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push
|
|
||||||
name: "Alpha Release: Push"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [dev]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
id-token: write
|
|
||||||
attestations: write
|
|
||||||
|
|
||||||
env:
|
|
||||||
NEXT_VERSION: "0.0.4"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: ubuntu-latest
|
|
||||||
platform: linux/amd64
|
|
||||||
- os: ubuntu-latest
|
|
||||||
platform: linux/arm64
|
|
||||||
- os: macos-latest
|
|
||||||
platform: darwin/universal
|
|
||||||
- os: windows-latest
|
|
||||||
platform: windows/amd64
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
uses: host-uk/build@v3
|
|
||||||
with:
|
|
||||||
build-name: core
|
|
||||||
build-platform: ${{ matrix.platform }}
|
|
||||||
build: true
|
|
||||||
package: true
|
|
||||||
sign: false
|
|
||||||
|
|
||||||
release:
|
|
||||||
needs: build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Download artifacts
|
|
||||||
uses: actions/download-artifact@v7
|
|
||||||
with:
|
|
||||||
path: dist
|
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: Prepare release files
|
|
||||||
run: |
|
|
||||||
mkdir -p release
|
|
||||||
cp dist/* release/ 2>/dev/null || true
|
|
||||||
ls -la release/
|
|
||||||
|
|
||||||
- name: Create alpha release
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
VERSION="v${{ env.NEXT_VERSION }}-alpha.${{ github.run_number }}"
|
|
||||||
|
|
||||||
gh release create "$VERSION" \
|
|
||||||
--title "Alpha: $VERSION" \
|
|
||||||
--notes "Canary build from dev branch.
|
|
||||||
|
|
||||||
**Version:** $VERSION
|
|
||||||
**Commit:** ${{ github.sha }}
|
|
||||||
**Built:** $(date -u +'%Y-%m-%d %H:%M:%S UTC')
|
|
||||||
**Run:** ${{ github.run_id }}
|
|
||||||
|
|
||||||
## Channel: Alpha (Canary)
|
|
||||||
|
|
||||||
This is an automated pre-release for early testing.
|
|
||||||
|
|
||||||
- Systems and early adopters can test breaking changes
|
|
||||||
- Quality scoring determines promotion to beta
|
|
||||||
- Use stable releases for production
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
\`\`\`bash
|
|
||||||
# macOS/Linux
|
|
||||||
curl -fsSL https://github.com/host-uk/core/releases/download/$VERSION/core-linux-amd64 -o core
|
|
||||||
chmod +x core && sudo mv core /usr/local/bin/
|
|
||||||
\`\`\`
|
|
||||||
" \
|
|
||||||
--prerelease \
|
|
||||||
--target dev \
|
|
||||||
release/*
|
|
||||||
41
.github/workflows/ci-manual.yml
vendored
41
.github/workflows/ci-manual.yml
vendored
|
|
@ -1,41 +0,0 @@
|
||||||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
|
|
||||||
name: "CI: Manual"
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
env:
|
|
||||||
CORE_VERSION: dev
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
qa:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version-file: 'go.mod'
|
|
||||||
|
|
||||||
- name: Install system dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev
|
|
||||||
|
|
||||||
- name: Build core CLI
|
|
||||||
run: |
|
|
||||||
go build -ldflags "-X github.com/host-uk/core/pkg/cli.AppVersion=${{ env.CORE_VERSION }}" -o /usr/local/bin/core .
|
|
||||||
core --version
|
|
||||||
|
|
||||||
- name: Generate code
|
|
||||||
run: go generate ./internal/cmd/updater/...
|
|
||||||
|
|
||||||
- name: Run QA
|
|
||||||
# Skip lint until golangci-lint supports Go 1.25
|
|
||||||
run: core go qa --skip=lint
|
|
||||||
|
|
||||||
- name: Verify build
|
|
||||||
run: |
|
|
||||||
core build --targets=linux/amd64 --ci
|
|
||||||
dist/linux_amd64/core --version
|
|
||||||
42
.github/workflows/ci-pull-request.yml
vendored
42
.github/workflows/ci-pull-request.yml
vendored
|
|
@ -1,42 +0,0 @@
|
||||||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
|
|
||||||
name: "CI: Pull Request"
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: [dev, main]
|
|
||||||
|
|
||||||
env:
|
|
||||||
CORE_VERSION: dev
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
qa:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version-file: 'go.mod'
|
|
||||||
|
|
||||||
- name: Install system dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev
|
|
||||||
|
|
||||||
- name: Build core CLI
|
|
||||||
run: |
|
|
||||||
go build -ldflags "-X github.com/host-uk/core/pkg/cli.AppVersion=${{ env.CORE_VERSION }}" -o /usr/local/bin/core .
|
|
||||||
core --version
|
|
||||||
|
|
||||||
- name: Generate code
|
|
||||||
run: go generate ./internal/cmd/updater/...
|
|
||||||
|
|
||||||
- name: Run QA
|
|
||||||
# Skip lint until golangci-lint supports Go 1.25
|
|
||||||
run: core go qa --skip=lint
|
|
||||||
|
|
||||||
- name: Verify build
|
|
||||||
run: |
|
|
||||||
core build --targets=linux/amd64 --ci
|
|
||||||
dist/linux_amd64/core --version
|
|
||||||
42
.github/workflows/ci-push.yml
vendored
42
.github/workflows/ci-push.yml
vendored
|
|
@ -1,42 +0,0 @@
|
||||||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push
|
|
||||||
name: "CI: Push"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [dev, main]
|
|
||||||
|
|
||||||
env:
|
|
||||||
CORE_VERSION: dev
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
qa:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version-file: 'go.mod'
|
|
||||||
|
|
||||||
- name: Install system dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev
|
|
||||||
|
|
||||||
- name: Build core CLI
|
|
||||||
run: |
|
|
||||||
go build -ldflags "-X github.com/host-uk/core/pkg/cli.AppVersion=${{ env.CORE_VERSION }}" -o /usr/local/bin/core .
|
|
||||||
core --version
|
|
||||||
|
|
||||||
- name: Generate code
|
|
||||||
run: go generate ./internal/cmd/updater/...
|
|
||||||
|
|
||||||
- name: Run QA
|
|
||||||
# Skip lint until golangci-lint supports Go 1.25
|
|
||||||
run: core go qa --skip=lint
|
|
||||||
|
|
||||||
- name: Verify build
|
|
||||||
run: |
|
|
||||||
core build --targets=linux/amd64 --ci
|
|
||||||
dist/linux_amd64/core --version
|
|
||||||
32
.github/workflows/codeql-pull-request.yml
vendored
32
.github/workflows/codeql-pull-request.yml
vendored
|
|
@ -1,32 +0,0 @@
|
||||||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
|
|
||||||
name: "CodeQL: Pull Request"
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: [dev, main]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
analyze:
|
|
||||||
name: Analyze
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
actions: read
|
|
||||||
contents: read
|
|
||||||
security-events: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
|
||||||
uses: github/codeql-action/init@v4
|
|
||||||
with:
|
|
||||||
languages: go
|
|
||||||
|
|
||||||
- name: Autobuild
|
|
||||||
uses: github/codeql-action/autobuild@v4
|
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
|
||||||
uses: github/codeql-action/analyze@v4
|
|
||||||
with:
|
|
||||||
category: "/language:go"
|
|
||||||
32
.github/workflows/codeql-push.yml
vendored
32
.github/workflows/codeql-push.yml
vendored
|
|
@ -1,32 +0,0 @@
|
||||||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push
|
|
||||||
name: "CodeQL: Push"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [dev, main]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
analyze:
|
|
||||||
name: Analyze
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
actions: read
|
|
||||||
contents: read
|
|
||||||
security-events: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
|
||||||
uses: github/codeql-action/init@v4
|
|
||||||
with:
|
|
||||||
languages: go
|
|
||||||
|
|
||||||
- name: Autobuild
|
|
||||||
uses: github/codeql-action/autobuild@v4
|
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
|
||||||
uses: github/codeql-action/analyze@v4
|
|
||||||
with:
|
|
||||||
category: "/language:go"
|
|
||||||
32
.github/workflows/codeql-schedule.yml
vendored
32
.github/workflows/codeql-schedule.yml
vendored
|
|
@ -1,32 +0,0 @@
|
||||||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
|
|
||||||
name: "CodeQL: Schedule"
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "0 6 * * 1"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
analyze:
|
|
||||||
name: Analyze
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
actions: read
|
|
||||||
contents: read
|
|
||||||
security-events: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
|
||||||
uses: github/codeql-action/init@v4
|
|
||||||
with:
|
|
||||||
languages: go
|
|
||||||
|
|
||||||
- name: Autobuild
|
|
||||||
uses: github/codeql-action/autobuild@v4
|
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
|
||||||
uses: github/codeql-action/analyze@v4
|
|
||||||
with:
|
|
||||||
category: "/language:go"
|
|
||||||
12
.github/workflows/codeql.yml
vendored
12
.github/workflows/codeql.yml
vendored
|
|
@ -10,13 +10,18 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
name: Analyze
|
name: Analyze (${{ matrix.language }})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
actions: read
|
actions: read
|
||||||
contents: read
|
contents: read
|
||||||
security-events: write
|
security-events: write
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
language: [go, javascript-typescript, python, actions]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
@ -24,7 +29,7 @@ jobs:
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v4
|
uses: github/codeql-action/init@v4
|
||||||
with:
|
with:
|
||||||
languages: go
|
languages: ${{ matrix.language }}
|
||||||
|
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v4
|
uses: github/codeql-action/autobuild@v4
|
||||||
|
|
@ -32,5 +37,4 @@ jobs:
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v4
|
uses: github/codeql-action/analyze@v4
|
||||||
with:
|
with:
|
||||||
category: "/language:go"
|
category: "/language:${{ matrix.language }}"
|
||||||
|
|
||||||
|
|
|
||||||
30
.github/workflows/codescan-pull-request.yml
vendored
30
.github/workflows/codescan-pull-request.yml
vendored
|
|
@ -1,30 +0,0 @@
|
||||||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
|
|
||||||
name: "Code Scanning: Pull Request"
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: ["dev"]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
CodeQL:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
security-events: write
|
|
||||||
actions: read
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: "Checkout Repository"
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: "Initialize CodeQL"
|
|
||||||
uses: github/codeql-action/init@v4
|
|
||||||
with:
|
|
||||||
languages: go,javascript,typescript
|
|
||||||
|
|
||||||
- name: "Autobuild"
|
|
||||||
uses: github/codeql-action/autobuild@v4
|
|
||||||
|
|
||||||
- name: "Perform CodeQL Analysis"
|
|
||||||
uses: github/codeql-action/analyze@v4
|
|
||||||
30
.github/workflows/codescan-push.yml
vendored
30
.github/workflows/codescan-push.yml
vendored
|
|
@ -1,30 +0,0 @@
|
||||||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push
|
|
||||||
name: "Code Scanning: Push"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ["dev"]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
CodeQL:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
security-events: write
|
|
||||||
actions: read
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: "Checkout Repository"
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: "Initialize CodeQL"
|
|
||||||
uses: github/codeql-action/init@v4
|
|
||||||
with:
|
|
||||||
languages: go,javascript,typescript
|
|
||||||
|
|
||||||
- name: "Autobuild"
|
|
||||||
uses: github/codeql-action/autobuild@v4
|
|
||||||
|
|
||||||
- name: "Perform CodeQL Analysis"
|
|
||||||
uses: github/codeql-action/analyze@v4
|
|
||||||
30
.github/workflows/codescan-schedule.yml
vendored
30
.github/workflows/codescan-schedule.yml
vendored
|
|
@ -1,30 +0,0 @@
|
||||||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
|
|
||||||
name: "Code Scanning: Schedule"
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "0 2 * * 1-5"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
CodeQL:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
security-events: write
|
|
||||||
actions: read
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: "Checkout Repository"
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: "Initialize CodeQL"
|
|
||||||
uses: github/codeql-action/init@v4
|
|
||||||
with:
|
|
||||||
languages: go,javascript,typescript
|
|
||||||
|
|
||||||
- name: "Autobuild"
|
|
||||||
uses: github/codeql-action/autobuild@v4
|
|
||||||
|
|
||||||
- name: "Perform CodeQL Analysis"
|
|
||||||
uses: github/codeql-action/analyze@v4
|
|
||||||
36
.github/workflows/codescan.yml
vendored
36
.github/workflows/codescan.yml
vendored
|
|
@ -1,36 +0,0 @@
|
||||||
name: "Code Scanning"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ["dev"]
|
|
||||||
pull_request:
|
|
||||||
branches: ["dev"]
|
|
||||||
schedule:
|
|
||||||
- cron: "0 2 * * 1-5"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
CodeQL:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
# required for all workflows
|
|
||||||
security-events: write
|
|
||||||
|
|
||||||
# only required for workflows in private repositories
|
|
||||||
actions: read
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: "Checkout Repository"
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: "Initialize CodeQL"
|
|
||||||
uses: github/codeql-action/init@v4
|
|
||||||
with:
|
|
||||||
languages: go,javascript,typescript
|
|
||||||
|
|
||||||
- name: "Autobuild"
|
|
||||||
uses: github/codeql-action/autobuild@v4
|
|
||||||
|
|
||||||
- name: "Perform CodeQL Analysis"
|
|
||||||
uses: github/codeql-action/analyze@v4
|
|
||||||
46
.github/workflows/coverage-manual.yml
vendored
46
.github/workflows/coverage-manual.yml
vendored
|
|
@ -1,46 +0,0 @@
|
||||||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
|
|
||||||
name: "Coverage: Manual"
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
env:
|
|
||||||
CORE_VERSION: dev
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
coverage:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version-file: 'go.mod'
|
|
||||||
|
|
||||||
- name: Install system dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev
|
|
||||||
|
|
||||||
- name: Build core CLI
|
|
||||||
run: |
|
|
||||||
go build -ldflags "-X github.com/host-uk/core/pkg/cli.AppVersion=${{ env.CORE_VERSION }}" -o /usr/local/bin/core .
|
|
||||||
core --version
|
|
||||||
|
|
||||||
- name: Generate code
|
|
||||||
run: go generate ./internal/cmd/updater/...
|
|
||||||
|
|
||||||
- name: Run coverage
|
|
||||||
run: core go cov
|
|
||||||
|
|
||||||
- name: Upload coverage reports to Codecov
|
|
||||||
uses: codecov/codecov-action@v5
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
|
|
||||||
- name: Upload coverage report
|
|
||||||
uses: actions/upload-artifact@v6
|
|
||||||
with:
|
|
||||||
name: coverage-report
|
|
||||||
path: coverage.txt
|
|
||||||
47
.github/workflows/coverage-pull-request.yml
vendored
47
.github/workflows/coverage-pull-request.yml
vendored
|
|
@ -1,47 +0,0 @@
|
||||||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
|
|
||||||
name: "Coverage: Pull Request"
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: [dev, main]
|
|
||||||
|
|
||||||
env:
|
|
||||||
CORE_VERSION: dev
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
coverage:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version-file: 'go.mod'
|
|
||||||
|
|
||||||
- name: Install system dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev
|
|
||||||
|
|
||||||
- name: Build core CLI
|
|
||||||
run: |
|
|
||||||
go build -ldflags "-X github.com/host-uk/core/pkg/cli.AppVersion=${{ env.CORE_VERSION }}" -o /usr/local/bin/core .
|
|
||||||
core --version
|
|
||||||
|
|
||||||
- name: Generate code
|
|
||||||
run: go generate ./internal/cmd/updater/...
|
|
||||||
|
|
||||||
- name: Run coverage
|
|
||||||
run: core go cov
|
|
||||||
|
|
||||||
- name: Upload coverage reports to Codecov
|
|
||||||
uses: codecov/codecov-action@v5
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
|
|
||||||
- name: Upload coverage report
|
|
||||||
uses: actions/upload-artifact@v6
|
|
||||||
with:
|
|
||||||
name: coverage-report
|
|
||||||
path: coverage.txt
|
|
||||||
47
.github/workflows/coverage-push.yml
vendored
47
.github/workflows/coverage-push.yml
vendored
|
|
@ -1,47 +0,0 @@
|
||||||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push
|
|
||||||
name: "Coverage: Push"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [dev, main]
|
|
||||||
|
|
||||||
env:
|
|
||||||
CORE_VERSION: dev
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
coverage:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v6
|
|
||||||
with:
|
|
||||||
go-version-file: 'go.mod'
|
|
||||||
|
|
||||||
- name: Install system dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev
|
|
||||||
|
|
||||||
- name: Build core CLI
|
|
||||||
run: |
|
|
||||||
go build -ldflags "-X github.com/host-uk/core/pkg/cli.AppVersion=${{ env.CORE_VERSION }}" -o /usr/local/bin/core .
|
|
||||||
core --version
|
|
||||||
|
|
||||||
- name: Generate code
|
|
||||||
run: go generate ./internal/cmd/updater/...
|
|
||||||
|
|
||||||
- name: Run coverage
|
|
||||||
run: core go cov
|
|
||||||
|
|
||||||
- name: Upload coverage reports to Codecov
|
|
||||||
uses: codecov/codecov-action@v5
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
|
|
||||||
- name: Upload coverage report
|
|
||||||
uses: actions/upload-artifact@v6
|
|
||||||
with:
|
|
||||||
name: coverage-report
|
|
||||||
path: coverage.txt
|
|
||||||
89
.github/workflows/pr-build-manual.yml
vendored
89
.github/workflows/pr-build-manual.yml
vendored
|
|
@ -1,89 +0,0 @@
|
||||||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
|
|
||||||
name: "PR Build: Manual"
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
pr_number:
|
|
||||||
description: 'PR number to build'
|
|
||||||
required: true
|
|
||||||
type: number
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: read
|
|
||||||
|
|
||||||
env:
|
|
||||||
NEXT_VERSION: "0.0.4"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: ubuntu-latest
|
|
||||||
platform: linux/amd64
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
uses: host-uk/build@v3
|
|
||||||
with:
|
|
||||||
build-name: core
|
|
||||||
build-platform: ${{ matrix.platform }}
|
|
||||||
build: true
|
|
||||||
package: true
|
|
||||||
sign: false
|
|
||||||
|
|
||||||
draft-release:
|
|
||||||
needs: build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
PR_NUM: ${{ inputs.pr_number }}
|
|
||||||
PR_SHA: ${{ github.sha }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Download artifacts
|
|
||||||
uses: actions/download-artifact@v7
|
|
||||||
with:
|
|
||||||
path: dist
|
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: Prepare release files
|
|
||||||
run: |
|
|
||||||
mkdir -p release
|
|
||||||
cp dist/* release/ 2>/dev/null || true
|
|
||||||
ls -la release/
|
|
||||||
|
|
||||||
- name: Create draft release
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
TAG="v${{ env.NEXT_VERSION }}.pr.${PR_NUM}.bid.${{ github.run_id }}"
|
|
||||||
|
|
||||||
# Delete existing draft for this PR if it exists
|
|
||||||
gh release delete "$TAG" -y 2>/dev/null || true
|
|
||||||
git push origin ":refs/tags/$TAG" 2>/dev/null || true
|
|
||||||
|
|
||||||
gh release create "$TAG" \
|
|
||||||
--title "Draft: PR #${PR_NUM}" \
|
|
||||||
--notes "Draft build for PR #${PR_NUM}.
|
|
||||||
|
|
||||||
**Version:** $TAG
|
|
||||||
**PR:** #${PR_NUM}
|
|
||||||
**Commit:** ${PR_SHA}
|
|
||||||
**Built:** $(date -u +'%Y-%m-%d %H:%M:%S UTC')
|
|
||||||
**Run:** ${{ github.run_id }}
|
|
||||||
|
|
||||||
## Channel: Draft
|
|
||||||
|
|
||||||
This is a draft build for testing PR changes before merge.
|
|
||||||
Not intended for production use.
|
|
||||||
|
|
||||||
Build artifacts available for download and testing.
|
|
||||||
" \
|
|
||||||
--draft \
|
|
||||||
--prerelease \
|
|
||||||
release/*
|
|
||||||
89
.github/workflows/pr-build-pull-request.yml
vendored
89
.github/workflows/pr-build-pull-request.yml
vendored
|
|
@ -1,89 +0,0 @@
|
||||||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
|
|
||||||
name: "PR Build: Pull Request"
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: [opened, synchronize, reopened]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: read
|
|
||||||
|
|
||||||
env:
|
|
||||||
NEXT_VERSION: "0.0.4"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
# Only build if PR is from the same repo (not forks)
|
|
||||||
if: github.event.pull_request.head.repo.full_name == github.repository
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: ubuntu-latest
|
|
||||||
platform: linux/amd64
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
uses: host-uk/build@v3
|
|
||||||
with:
|
|
||||||
build-name: core
|
|
||||||
build-platform: ${{ matrix.platform }}
|
|
||||||
build: true
|
|
||||||
package: true
|
|
||||||
sign: false
|
|
||||||
|
|
||||||
draft-release:
|
|
||||||
needs: build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
PR_NUM: ${{ github.event.pull_request.number }}
|
|
||||||
PR_SHA: ${{ github.event.pull_request.head.sha }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Download artifacts
|
|
||||||
uses: actions/download-artifact@v7
|
|
||||||
with:
|
|
||||||
path: dist
|
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: Prepare release files
|
|
||||||
run: |
|
|
||||||
mkdir -p release
|
|
||||||
cp dist/* release/ 2>/dev/null || true
|
|
||||||
ls -la release/
|
|
||||||
|
|
||||||
- name: Create draft release
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
TAG="v${{ env.NEXT_VERSION }}.pr.${PR_NUM}.bid.${{ github.run_id }}"
|
|
||||||
|
|
||||||
# Delete existing draft for this PR if it exists
|
|
||||||
gh release delete "$TAG" -y 2>/dev/null || true
|
|
||||||
git push origin ":refs/tags/$TAG" 2>/dev/null || true
|
|
||||||
|
|
||||||
gh release create "$TAG" \
|
|
||||||
--title "Draft: PR #${PR_NUM}" \
|
|
||||||
--notes "Draft build for PR #${PR_NUM}.
|
|
||||||
|
|
||||||
**Version:** $TAG
|
|
||||||
**PR:** #${PR_NUM}
|
|
||||||
**Commit:** ${PR_SHA}
|
|
||||||
**Built:** $(date -u +'%Y-%m-%d %H:%M:%S UTC')
|
|
||||||
**Run:** ${{ github.run_id }}
|
|
||||||
|
|
||||||
## Channel: Draft
|
|
||||||
|
|
||||||
This is a draft build for testing PR changes before merge.
|
|
||||||
Not intended for production use.
|
|
||||||
|
|
||||||
Build artifacts available for download and testing.
|
|
||||||
" \
|
|
||||||
--draft \
|
|
||||||
--prerelease \
|
|
||||||
release/*
|
|
||||||
Loading…
Add table
Reference in a new issue