Compare commits
3 Commits
v0.5.2
...
v0.2.0-dev.4
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c9df7d40f | |||
| c7a1f15fcf | |||
| 261d636d71 |
@@ -115,6 +115,9 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
[ "$SKIP_BUILD" = "true" ] && exit 0
|
[ "$SKIP_BUILD" = "true" ] && exit 0
|
||||||
|
# Push tag to GitHub first so it exists before creating the release
|
||||||
|
git remote add github-release https://x-access-token:${{ secrets.GH_PAT }}@github.com/cpfarhood/headlamp-polaris-plugin.git 2>/dev/null || true
|
||||||
|
git push -f github-release ${GITHUB_REF_NAME} 2>/dev/null || true
|
||||||
GH_API="https://api.github.com/repos/cpfarhood/headlamp-polaris-plugin"
|
GH_API="https://api.github.com/repos/cpfarhood/headlamp-polaris-plugin"
|
||||||
# Create release or fetch existing one
|
# Create release or fetch existing one
|
||||||
BODY=$(curl -s -X POST \
|
BODY=$(curl -s -X POST \
|
||||||
@@ -163,15 +166,21 @@ jobs:
|
|||||||
VERSION=${GITHUB_REF_NAME#v}
|
VERSION=${GITHUB_REF_NAME#v}
|
||||||
git config user.name "gitea-actions[bot]"
|
git config user.name "gitea-actions[bot]"
|
||||||
git config user.email "gitea-actions[bot]@git.farh.net"
|
git config user.email "gitea-actions[bot]@git.farh.net"
|
||||||
git fetch origin main
|
# Determine which Gitea branch to update based on version suffix
|
||||||
git checkout origin/main -B main
|
if [[ "$VERSION" == *"-dev."* ]]; then
|
||||||
|
GITEA_BRANCH="dev/namespace-drawer"
|
||||||
|
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-checksum:.*|headlamp/plugin/archive-checksum: sha256:${CHECKSUM}|" artifacthub-pkg.yml
|
||||||
sed -i "s|headlamp/plugin/archive-url:.*|headlamp/plugin/archive-url: \"https://github.com/cpfarhood/headlamp-polaris-plugin/releases/download/${GITHUB_REF_NAME}/headlamp-polaris-plugin-${VERSION}.tar.gz\"|" artifacthub-pkg.yml
|
sed -i "s|headlamp/plugin/archive-url:.*|headlamp/plugin/archive-url: \"https://github.com/cpfarhood/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
|
sed -i "s|^version:.*|version: ${VERSION}|" artifacthub-pkg.yml
|
||||||
git add artifacthub-pkg.yml
|
git add artifacthub-pkg.yml
|
||||||
git diff --cached --quiet || {
|
git diff --cached --quiet || {
|
||||||
git commit -m "ci: update artifact hub metadata for ${GITHUB_REF_NAME}"
|
git commit -m "ci: update artifact hub metadata for ${GITHUB_REF_NAME}"
|
||||||
git push origin main
|
git push origin temp-update:${GITEA_BRANCH}
|
||||||
}
|
}
|
||||||
# Force-move tag to the commit with correct checksum.
|
# Force-move tag to the commit with correct checksum.
|
||||||
# This triggers a new CI run, but the guard step will detect
|
# This triggers a new CI run, but the guard step will detect
|
||||||
@@ -179,7 +188,9 @@ jobs:
|
|||||||
git tag -f ${GITHUB_REF_NAME}
|
git tag -f ${GITHUB_REF_NAME}
|
||||||
git push -f origin ${GITHUB_REF_NAME}
|
git push -f origin ${GITHUB_REF_NAME}
|
||||||
# Also push to GitHub directly to avoid waiting for mirror sync
|
# Also push to GitHub directly to avoid waiting for mirror sync
|
||||||
|
# Single repo pattern: both stable and dev releases go to same GitHub repo
|
||||||
|
# ArtifactHub will differentiate based on prerelease flag in metadata
|
||||||
git remote add github https://x-access-token:${{ secrets.GH_PAT }}@github.com/cpfarhood/headlamp-polaris-plugin.git 2>/dev/null || true
|
git remote add github https://x-access-token:${{ secrets.GH_PAT }}@github.com/cpfarhood/headlamp-polaris-plugin.git 2>/dev/null || true
|
||||||
git push github main 2>/dev/null || true
|
git push github temp-update:main 2>/dev/null || true
|
||||||
git push -f github ${GITHUB_REF_NAME} 2>/dev/null || true
|
git push -f github ${GITHUB_REF_NAME} 2>/dev/null || true
|
||||||
echo "Tag ${GITHUB_REF_NAME} aligned with updated metadata"
|
echo "Tag ${GITHUB_REF_NAME} aligned with updated metadata"
|
||||||
|
|||||||
+3
-3
@@ -1,4 +1,4 @@
|
|||||||
version: 0.1.6
|
version: 0.2.0-dev.4
|
||||||
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: cpfarhood
|
- name: cpfarhood
|
||||||
email: "chris@farhood.org"
|
email: "chris@farhood.org"
|
||||||
annotations:
|
annotations:
|
||||||
headlamp/plugin/archive-url: "https://github.com/cpfarhood/headlamp-polaris-plugin/releases/download/v0.1.6/headlamp-polaris-plugin-0.1.6.tar.gz"
|
headlamp/plugin/archive-url: "https://github.com/cpfarhood/headlamp-polaris-plugin/releases/download/v0.2.0-dev.4/headlamp-polaris-plugin-0.2.0-dev.4.tar.gz"
|
||||||
headlamp/plugin/version-compat: ">=0.26"
|
headlamp/plugin/version-compat: ">=0.26"
|
||||||
headlamp/plugin/archive-checksum: sha256:7e56af04bcd9121e09eab092608c774b3aa2137d1e0338f1bb06149dd3f5c3ce
|
headlamp/plugin/archive-checksum: sha256:70d46b8b478326794646bd90f9b4178c3010310509feecbe40305622954436a4
|
||||||
headlamp/plugin/distro-compat: in-cluster
|
headlamp/plugin/distro-compat: in-cluster
|
||||||
|
|||||||
Reference in New Issue
Block a user