Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3796d57d12 | |||
| 88541bd328 | |||
| e884894840 | |||
| 189ae50024 | |||
| e62fba9cc1 | |||
| 062ac72340 |
@@ -1,36 +0,0 @@
|
|||||||
name: AI Code Review
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ai-review:
|
|
||||||
name: AI Code Review
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: catthehacker/ubuntu:act-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: AI Review
|
|
||||||
uses: Nikita-Filonov/ai-review@v0.56.0
|
|
||||||
with:
|
|
||||||
review-command: run
|
|
||||||
env:
|
|
||||||
LLM__PROVIDER: "OPENAI"
|
|
||||||
LLM__META__MODEL: ${{ vars.AI_REVIEW_MODEL }}
|
|
||||||
LLM__META__MAX_TOKENS: "15000"
|
|
||||||
LLM__META__TEMPERATURE: "0.3"
|
|
||||||
LLM__HTTP_CLIENT__API_URL: "https://api.openai.com/v1"
|
|
||||||
LLM__HTTP_CLIENT__API_TOKEN: ${{ secrets.OPENAI_API_KEY }}
|
|
||||||
VCS__PROVIDER: "GITEA"
|
|
||||||
VCS__PIPELINE__OWNER: ${{ github.repository_owner }}
|
|
||||||
VCS__PIPELINE__REPO: ${{ github.event.repository.name }}
|
|
||||||
VCS__PIPELINE__PULL_NUMBER: ${{ github.event.pull_request.number }}
|
|
||||||
VCS__HTTP_CLIENT__API_URL: ${{ github.server_url }}/api/v1
|
|
||||||
VCS__HTTP_CLIENT__API_TOKEN: ${{ secrets.AI_REVIEW_GITEA_TOKEN }}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
name: CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container: node:20
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: npx @kinvolk/headlamp-plugin build
|
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
run: npx eslint --ext .ts,.tsx src/
|
|
||||||
|
|
||||||
- name: Type-check
|
|
||||||
run: npx tsc --noEmit
|
|
||||||
|
|
||||||
- name: Format check
|
|
||||||
run: npx prettier --check src/
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
name: E2E
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
e2e:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container: node:20
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Install Chromium
|
|
||||||
run: npx playwright install --with-deps chromium
|
|
||||||
|
|
||||||
- name: Run E2E smoke tests
|
|
||||||
env:
|
|
||||||
HEADLAMP_URL: https://headlamp.animaniacs.farh.net
|
|
||||||
AUTHENTIK_USERNAME: ${{ secrets.AUTHENTIK_USERNAME }}
|
|
||||||
AUTHENTIK_PASSWORD: ${{ secrets.AUTHENTIK_PASSWORD }}
|
|
||||||
run: npx playwright test
|
|
||||||
@@ -1,173 +0,0 @@
|
|||||||
name: Release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container: node:20
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Check if release is already finalized
|
|
||||||
run: |
|
|
||||||
VERSION=${GITHUB_REF_NAME#v}
|
|
||||||
TARBALL_URL="https://github.com/privilegedescalation/headlamp-polaris-plugin/releases/download/${GITHUB_REF_NAME}/headlamp-polaris-plugin-${VERSION}.tar.gz"
|
|
||||||
HTTP_CODE=$(curl -sL -o /tmp/release.tar.gz -w "%{http_code}" "$TARBALL_URL" 2>/dev/null)
|
|
||||||
if [ "$HTTP_CODE" = "200" ]; then
|
|
||||||
ACTUAL="sha256:$(sha256sum /tmp/release.tar.gz | awk '{print $1}')"
|
|
||||||
EXPECTED=$(grep 'archive-checksum' artifacthub-pkg.yml | awk '{print $2}')
|
|
||||||
echo "Release tarball checksum: $ACTUAL"
|
|
||||||
echo "Metadata checksum: $EXPECTED"
|
|
||||||
if [ "$ACTUAL" = "$EXPECTED" ]; then
|
|
||||||
echo "SKIP_BUILD=true" >> $GITHUB_ENV
|
|
||||||
echo "Checksums match - release is finalized, nothing to do"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "No existing release (HTTP $HTTP_CODE) - will build"
|
|
||||||
fi
|
|
||||||
rm -f /tmp/release.tar.gz
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
[ "$SKIP_BUILD" = "true" ] && exit 0
|
|
||||||
npm ci
|
|
||||||
|
|
||||||
- name: Build plugin
|
|
||||||
run: |
|
|
||||||
[ "$SKIP_BUILD" = "true" ] && exit 0
|
|
||||||
npx @kinvolk/headlamp-plugin build
|
|
||||||
|
|
||||||
- name: Package tarball
|
|
||||||
run: |
|
|
||||||
[ "$SKIP_BUILD" = "true" ] && exit 0
|
|
||||||
npx @kinvolk/headlamp-plugin package
|
|
||||||
|
|
||||||
- name: Compute tarball checksum
|
|
||||||
run: |
|
|
||||||
[ "$SKIP_BUILD" = "true" ] && exit 0
|
|
||||||
TARBALL=$(ls *.tar.gz)
|
|
||||||
CHECKSUM=$(sha256sum "$TARBALL" | awk '{print $1}')
|
|
||||||
echo "TARBALL=$TARBALL" >> $GITHUB_ENV
|
|
||||||
echo "CHECKSUM=$CHECKSUM" >> $GITHUB_ENV
|
|
||||||
echo "Tarball: $TARBALL"
|
|
||||||
echo "Checksum: sha256:$CHECKSUM"
|
|
||||||
|
|
||||||
- name: Install Docker CLI
|
|
||||||
run: |
|
|
||||||
[ "$SKIP_BUILD" = "true" ] && exit 0
|
|
||||||
apt-get update && apt-get install -y docker.io
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
|
||||||
run: |
|
|
||||||
[ "$SKIP_BUILD" = "true" ] && exit 0
|
|
||||||
docker build -t git.farh.net/${{ github.repository }}:${{ github.ref_name }} -t git.farh.net/${{ github.repository }}:latest .
|
|
||||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login git.farh.net -u ${{ github.actor }} --password-stdin
|
|
||||||
docker push git.farh.net/${{ github.repository }}:${{ github.ref_name }}
|
|
||||||
docker push git.farh.net/${{ github.repository }}:latest
|
|
||||||
|
|
||||||
- name: Create Gitea release
|
|
||||||
run: |
|
|
||||||
[ "$SKIP_BUILD" = "true" ] && exit 0
|
|
||||||
API_URL="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}"
|
|
||||||
# Create release (or get existing)
|
|
||||||
RELEASE=$(curl -s -X POST \
|
|
||||||
-H "Authorization: token ${{ github.token }}" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
"${API_URL}/releases" \
|
|
||||||
-d "{\"tag_name\":\"${GITHUB_REF_NAME}\",\"name\":\"${GITHUB_REF_NAME}\"}")
|
|
||||||
RELEASE_ID=$(echo "$RELEASE" | node -e "process.stdin.resume();let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>console.log(JSON.parse(d).id))")
|
|
||||||
if [ "$RELEASE_ID" = "undefined" ]; then
|
|
||||||
RELEASE=$(curl -sf \
|
|
||||||
-H "Authorization: token ${{ github.token }}" \
|
|
||||||
"${API_URL}/releases/tags/${GITHUB_REF_NAME}")
|
|
||||||
RELEASE_ID=$(echo "$RELEASE" | node -e "process.stdin.resume();let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>console.log(JSON.parse(d).id))")
|
|
||||||
fi
|
|
||||||
echo "Gitea Release ID: $RELEASE_ID"
|
|
||||||
# Delete existing assets
|
|
||||||
ASSETS=$(curl -sf \
|
|
||||||
-H "Authorization: token ${{ github.token }}" \
|
|
||||||
"${API_URL}/releases/${RELEASE_ID}/assets")
|
|
||||||
echo "$ASSETS" | node -e "
|
|
||||||
process.stdin.resume();let d='';
|
|
||||||
process.stdin.on('data',c=>d+=c);
|
|
||||||
process.stdin.on('end',()=>{
|
|
||||||
JSON.parse(d).forEach(a=>console.log(a.id));
|
|
||||||
})" | while read -r ASSET_ID; do
|
|
||||||
curl -sf -X DELETE \
|
|
||||||
-H "Authorization: token ${{ github.token }}" \
|
|
||||||
"${API_URL}/releases/${RELEASE_ID}/assets/${ASSET_ID}"
|
|
||||||
done
|
|
||||||
# Upload tarball
|
|
||||||
curl -sf -X POST \
|
|
||||||
-H "Authorization: token ${{ github.token }}" \
|
|
||||||
-F "attachment=@${TARBALL}" \
|
|
||||||
"${API_URL}/releases/${RELEASE_ID}/assets?name=${TARBALL}"
|
|
||||||
echo "Gitea release updated"
|
|
||||||
|
|
||||||
- name: Create GitHub release
|
|
||||||
run: |
|
|
||||||
[ "$SKIP_BUILD" = "true" ] && exit 0
|
|
||||||
# GitHub API to create/update release
|
|
||||||
GITHUB_API="https://api.github.com/repos/privilegedescalation/headlamp-polaris-plugin"
|
|
||||||
# Check if release exists
|
|
||||||
RELEASE_DATA=$(curl -sf \
|
|
||||||
-H "Authorization: token ${{ secrets.GH_TOKEN }}" \
|
|
||||||
"${GITHUB_API}/releases/tags/${GITHUB_REF_NAME}" || echo "{}")
|
|
||||||
RELEASE_ID=$(echo "$RELEASE_DATA" | node -e "process.stdin.resume();let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>console.log(JSON.parse(d).id||''))")
|
|
||||||
|
|
||||||
if [ -z "$RELEASE_ID" ]; then
|
|
||||||
# Create new release
|
|
||||||
RELEASE_DATA=$(curl -sf -X POST \
|
|
||||||
-H "Authorization: token ${{ secrets.GH_TOKEN }}" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
"${GITHUB_API}/releases" \
|
|
||||||
-d "{\"tag_name\":\"${GITHUB_REF_NAME}\",\"name\":\"${GITHUB_REF_NAME}\",\"draft\":false,\"prerelease\":false}")
|
|
||||||
RELEASE_ID=$(echo "$RELEASE_DATA" | node -e "process.stdin.resume();let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>console.log(JSON.parse(d).id))")
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "GitHub Release ID: $RELEASE_ID"
|
|
||||||
# Upload tarball to GitHub
|
|
||||||
UPLOAD_URL=$(echo "$RELEASE_DATA" | node -e "process.stdin.resume();let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{const r=JSON.parse(d);console.log(r.upload_url||'https://uploads.github.com/repos/privilegedescalation/headlamp-polaris-plugin/releases/${RELEASE_ID}/assets')})" | sed 's/{.*}//')
|
|
||||||
curl -sf -X POST \
|
|
||||||
-H "Authorization: token ${{ secrets.GH_TOKEN }}" \
|
|
||||||
-H "Content-Type: application/gzip" \
|
|
||||||
--data-binary "@${TARBALL}" \
|
|
||||||
"${UPLOAD_URL}?name=${TARBALL}"
|
|
||||||
echo "GitHub release updated"
|
|
||||||
|
|
||||||
- name: Update metadata and align tag
|
|
||||||
run: |
|
|
||||||
[ "$SKIP_BUILD" = "true" ] && exit 0
|
|
||||||
VERSION=${GITHUB_REF_NAME#v}
|
|
||||||
git config user.name "gitea-actions[bot]"
|
|
||||||
git config user.email "gitea-actions[bot]@git.farh.net"
|
|
||||||
# Determine which Gitea branch to update based on version suffix
|
|
||||||
if [[ "$VERSION" == *"-dev."* ]]; then
|
|
||||||
GITEA_BRANCH="dev"
|
|
||||||
else
|
|
||||||
GITEA_BRANCH="main"
|
|
||||||
fi
|
|
||||||
git fetch origin ${GITEA_BRANCH}
|
|
||||||
git checkout origin/${GITEA_BRANCH} -B temp-update
|
|
||||||
sed -i "s|headlamp/plugin/archive-checksum:.*|headlamp/plugin/archive-checksum: sha256:${CHECKSUM}|" artifacthub-pkg.yml
|
|
||||||
sed -i "s|headlamp/plugin/archive-url:.*|headlamp/plugin/archive-url: \"https://github.com/privilegedescalation/headlamp-polaris-plugin/releases/download/${GITHUB_REF_NAME}/headlamp-polaris-plugin-${VERSION}.tar.gz\"|" artifacthub-pkg.yml
|
|
||||||
sed -i "s|^version:.*|version: ${VERSION}|" artifacthub-pkg.yml
|
|
||||||
git add artifacthub-pkg.yml
|
|
||||||
git diff --cached --quiet || {
|
|
||||||
git commit -m "ci: update artifact hub metadata for ${GITHUB_REF_NAME}"
|
|
||||||
git push origin temp-update:${GITEA_BRANCH}
|
|
||||||
}
|
|
||||||
# Force-move tag to the commit with correct checksum.
|
|
||||||
# This triggers a new CI run, but the guard step will detect
|
|
||||||
# that the release checksum already matches and skip the build.
|
|
||||||
git tag -f ${GITHUB_REF_NAME}
|
|
||||||
git push -f origin ${GITHUB_REF_NAME}
|
|
||||||
echo "Tag ${GITHUB_REF_NAME} aligned with updated metadata"
|
|
||||||
echo "Note: GitHub sync handled by Gitea mirror configuration"
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
name: Prepare Release
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
version:
|
|
||||||
description: 'Version to release (without v prefix, e.g., 0.4.0)'
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
prepare:
|
|
||||||
runs-on: local-ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
steps:
|
|
||||||
- name: Validate version format
|
|
||||||
run: |
|
|
||||||
if ! echo "${{ inputs.version }}" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then
|
|
||||||
echo "::error::Version must be in format X.Y.Z (e.g., 0.4.0)"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Configure git
|
|
||||||
run: |
|
|
||||||
git config user.name "github-actions[bot]"
|
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
||||||
|
|
||||||
- name: Update package.json version
|
|
||||||
run: |
|
|
||||||
jq --arg version "${{ inputs.version }}" '.version = $version' package.json > package.json.tmp
|
|
||||||
mv package.json.tmp package.json
|
|
||||||
|
|
||||||
- name: Update artifacthub-pkg.yml version
|
|
||||||
run: |
|
|
||||||
VERSION="${{ inputs.version }}"
|
|
||||||
RELEASE_URL="https://github.com/${{ github.repository }}/releases/download/v${VERSION}/polaris-${VERSION}.tar.gz"
|
|
||||||
|
|
||||||
sed -i "s|^version:.*|version: ${VERSION}|" artifacthub-pkg.yml
|
|
||||||
sed -i "s|headlamp/plugin/archive-url:.*|headlamp/plugin/archive-url: \"${RELEASE_URL}\"|" artifacthub-pkg.yml
|
|
||||||
|
|
||||||
# Set placeholder checksum - will be updated after release
|
|
||||||
sed -i "s|headlamp/plugin/archive-checksum:.*|headlamp/plugin/archive-checksum: sha256:PLACEHOLDER_WILL_BE_UPDATED_AFTER_RELEASE|" artifacthub-pkg.yml
|
|
||||||
|
|
||||||
- name: Commit version bump
|
|
||||||
run: |
|
|
||||||
git add package.json artifacthub-pkg.yml
|
|
||||||
git commit -m "chore: bump version to ${{ inputs.version }}"
|
|
||||||
git push origin main
|
|
||||||
|
|
||||||
- name: Create and push tag
|
|
||||||
run: |
|
|
||||||
git tag "v${{ inputs.version }}"
|
|
||||||
git push origin "v${{ inputs.version }}"
|
|
||||||
|
|
||||||
- name: Summary
|
|
||||||
run: |
|
|
||||||
echo "✓ Version bumped to ${{ inputs.version }}"
|
|
||||||
echo "✓ Tag v${{ inputs.version }} created"
|
|
||||||
echo ""
|
|
||||||
echo "The release workflow will now run automatically."
|
|
||||||
echo "After it completes, the checksum will be updated on main."
|
|
||||||
@@ -1,28 +1,46 @@
|
|||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_dispatch:
|
||||||
tags:
|
inputs:
|
||||||
- 'v*'
|
version:
|
||||||
|
description: 'Version to release (without v prefix, e.g., 0.4.0)'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-release:
|
release:
|
||||||
runs-on: local-ubuntu-latest
|
runs-on: local-ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
outputs:
|
|
||||||
version: ${{ steps.extract_version.outputs.version }}
|
|
||||||
checksum: ${{ steps.compute_checksum.outputs.checksum }}
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Validate version format
|
||||||
|
run: |
|
||||||
|
if ! echo "${{ inputs.version }}" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then
|
||||||
|
echo "::error::Version must be in format X.Y.Z (e.g., 0.4.0)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Extract version from tag
|
- name: Configure git
|
||||||
id: extract_version
|
|
||||||
run: |
|
run: |
|
||||||
VERSION=${GITHUB_REF_NAME#v}
|
git config user.name "github-actions[bot]"
|
||||||
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
echo "Version: ${VERSION}"
|
|
||||||
|
- name: Update package.json version
|
||||||
|
run: |
|
||||||
|
jq --arg version "${{ inputs.version }}" '.version = $version' package.json > package.json.tmp
|
||||||
|
mv package.json.tmp package.json
|
||||||
|
|
||||||
|
- name: Update artifacthub-pkg.yml version
|
||||||
|
run: |
|
||||||
|
VERSION="${{ inputs.version }}"
|
||||||
|
RELEASE_URL="https://github.com/${{ github.repository }}/releases/download/v${VERSION}/polaris-${VERSION}.tar.gz"
|
||||||
|
|
||||||
|
sed -i "s|^version:.*|version: ${VERSION}|" artifacthub-pkg.yml
|
||||||
|
sed -i "s|headlamp/plugin/archive-url:.*|headlamp/plugin/archive-url: \"${RELEASE_URL}\"|" artifacthub-pkg.yml
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
@@ -41,7 +59,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Validate tarball name
|
- name: Validate tarball name
|
||||||
run: |
|
run: |
|
||||||
EXPECTED="polaris-${{ steps.extract_version.outputs.version }}.tar.gz"
|
EXPECTED="polaris-${{ inputs.version }}.tar.gz"
|
||||||
ACTUAL=$(ls *.tar.gz)
|
ACTUAL=$(ls *.tar.gz)
|
||||||
if [ "$EXPECTED" != "$ACTUAL" ]; then
|
if [ "$EXPECTED" != "$ACTUAL" ]; then
|
||||||
echo "::error::Tarball name mismatch! Expected: $EXPECTED, Got: $ACTUAL"
|
echo "::error::Tarball name mismatch! Expected: $EXPECTED, Got: $ACTUAL"
|
||||||
@@ -52,15 +70,32 @@ jobs:
|
|||||||
- name: Compute checksum
|
- name: Compute checksum
|
||||||
id: compute_checksum
|
id: compute_checksum
|
||||||
run: |
|
run: |
|
||||||
TARBALL="polaris-${{ steps.extract_version.outputs.version }}.tar.gz"
|
TARBALL="polaris-${{ inputs.version }}.tar.gz"
|
||||||
CHECKSUM=$(sha256sum "$TARBALL" | awk '{print $1}')
|
CHECKSUM=$(sha256sum "$TARBALL" | awk '{print $1}')
|
||||||
echo "checksum=${CHECKSUM}" >> $GITHUB_OUTPUT
|
echo "checksum=${CHECKSUM}" >> $GITHUB_OUTPUT
|
||||||
echo "Checksum: sha256:${CHECKSUM}"
|
echo "Checksum: sha256:${CHECKSUM}"
|
||||||
|
|
||||||
|
- name: Update checksum in metadata
|
||||||
|
run: |
|
||||||
|
CHECKSUM="${{ steps.compute_checksum.outputs.checksum }}"
|
||||||
|
sed -i "s|headlamp/plugin/archive-checksum:.*|headlamp/plugin/archive-checksum: sha256:${CHECKSUM}|" artifacthub-pkg.yml
|
||||||
|
|
||||||
|
- name: Commit version bump and metadata
|
||||||
|
run: |
|
||||||
|
git add package.json artifacthub-pkg.yml
|
||||||
|
git commit -m "chore: release v${{ inputs.version }}"
|
||||||
|
git push origin main
|
||||||
|
|
||||||
|
- name: Create and push tag
|
||||||
|
run: |
|
||||||
|
git tag "v${{ inputs.version }}"
|
||||||
|
git push origin "v${{ inputs.version }}"
|
||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
files: polaris-${{ steps.extract_version.outputs.version }}.tar.gz
|
tag_name: "v${{ inputs.version }}"
|
||||||
|
files: polaris-${{ inputs.version }}.tar.gz
|
||||||
fail_on_unmatched_files: true
|
fail_on_unmatched_files: true
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
@@ -68,35 +103,9 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
update-metadata:
|
- name: Summary
|
||||||
needs: build-and-release
|
|
||||||
runs-on: local-ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
steps:
|
|
||||||
- name: Checkout main branch
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: main
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Configure git
|
|
||||||
run: |
|
run: |
|
||||||
git config user.name "github-actions[bot]"
|
echo "✓ Version bumped to ${{ inputs.version }}"
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
echo "✓ Metadata updated with checksum sha256:${{ steps.compute_checksum.outputs.checksum }}"
|
||||||
|
echo "✓ Tag v${{ inputs.version }} created"
|
||||||
- name: Update checksum in metadata
|
echo "✓ GitHub release published with tarball"
|
||||||
run: |
|
|
||||||
VERSION="${{ needs.build-and-release.outputs.version }}"
|
|
||||||
CHECKSUM="${{ needs.build-and-release.outputs.checksum }}"
|
|
||||||
|
|
||||||
sed -i "s|headlamp/plugin/archive-checksum:.*|headlamp/plugin/archive-checksum: sha256:${CHECKSUM}|" artifacthub-pkg.yml
|
|
||||||
|
|
||||||
git add artifacthub-pkg.yml
|
|
||||||
if ! git diff --cached --quiet; then
|
|
||||||
git commit -m "ci: update checksum for v${VERSION}"
|
|
||||||
git push origin main
|
|
||||||
echo "✓ Checksum updated on main branch"
|
|
||||||
else
|
|
||||||
echo "✓ Checksum already up to date"
|
|
||||||
fi
|
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- App bar badge, settings buttons, and UI elements now use theme-aware CSS variables
|
- App bar badge, settings buttons, and UI elements now use theme-aware CSS variables
|
||||||
|
|
||||||
### Infrastructure
|
### Infrastructure
|
||||||
- Migrated from Gitea to GitHub Actions exclusively
|
|
||||||
- Added CI workflow for lint, type-check, build, and test
|
- Added CI workflow for lint, type-check, build, and test
|
||||||
- Enhanced E2E testing documentation with comprehensive guides
|
- Enhanced E2E testing documentation with comprehensive guides
|
||||||
- Added documentation-engineer subagent
|
- Added documentation-engineer subagent
|
||||||
|
|||||||
+3
-3
@@ -1,4 +1,4 @@
|
|||||||
version: 0.4.0
|
version: 0.4.1
|
||||||
name: headlamp-polaris-plugin
|
name: headlamp-polaris-plugin
|
||||||
displayName: Polaris
|
displayName: Polaris
|
||||||
createdAt: "2026-02-05T19:00:00Z"
|
createdAt: "2026-02-05T19:00:00Z"
|
||||||
@@ -28,7 +28,7 @@ maintainers:
|
|||||||
- name: privilegedescalation
|
- name: privilegedescalation
|
||||||
email: "chris@farhood.org"
|
email: "chris@farhood.org"
|
||||||
annotations:
|
annotations:
|
||||||
headlamp/plugin/archive-url: "https://github.com/privilegedescalation/headlamp-polaris-plugin/releases/download/v0.4.0/polaris-0.4.0.tar.gz"
|
headlamp/plugin/archive-url: "https://github.com/privilegedescalation/headlamp-polaris-plugin/releases/download/v0.4.1/polaris-0.4.1.tar.gz"
|
||||||
headlamp/plugin/version-compat: ">=0.26"
|
headlamp/plugin/version-compat: ">=0.26"
|
||||||
headlamp/plugin/archive-checksum: sha256:PLACEHOLDER_WILL_BE_UPDATED_AFTER_RELEASE
|
headlamp/plugin/archive-checksum: sha256:74e8fb50847312728f914f8d7dba9a2be5ab977ca3ccc3909b3d6143d9bc6eee
|
||||||
headlamp/plugin/distro-compat: in-cluster
|
headlamp/plugin/distro-compat: in-cluster
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ Additional considerations:
|
|||||||
## MCP Servers
|
## MCP Servers
|
||||||
|
|
||||||
The project has MCP server integrations configured in `.mcp.json`:
|
The project has MCP server integrations configured in `.mcp.json`:
|
||||||
- **Gitea** (git.farh.net): Source control via `gitea-mcp-server`
|
- **GitHub**: Source control via `github-mcp-server`
|
||||||
- **Kubernetes** (local): Cluster access via `kubernetes-mcp-server`
|
- **Kubernetes** (local): Cluster access via `kubernetes-mcp-server`
|
||||||
- **Flux** (local): Flux Operator access via `flux-operator-mcp`
|
- **Flux** (local): Flux Operator access via `flux-operator-mcp`
|
||||||
|
- **Playwright**: Browser automation via `@playwright/mcp`
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "polaris",
|
"name": "polaris",
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"description": "Headlamp plugin for Fairwinds Polaris audit results",
|
"description": "Headlamp plugin for Fairwinds Polaris audit results",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
Reference in New Issue
Block a user