fix: remove broken github action
R
Rüdiger Küpper
<rpr@9it.de>
committete am 19.02.2026 07:56
3108d6df04a562ddb4076af08a23bc28159ab81a
gelöscht
.github/workflows/release-quilldrop.yml
+0
−329
| @@ -1,329 +0,0 @@ | ||
| 1 | -name: build-and-release |
|
| 2 | - | |
| 3 | -on: |
|
| 4 | -# push: |
|
| 5 | -# branches: [main] |
|
| 6 | -workflow_dispatch: |
|
| 7 | -# tags: |
|
| 8 | -# - 'v*' # z.B. v1.2.3 |
|
| 9 | - | |
| 10 | -permissions: |
|
| 11 | -contents: write |
|
| 12 | -packages: write |
|
| 13 | -id-token: write |
|
| 14 | -issues: write |
|
| 15 | -pull-requests: write |
|
| 16 | - | |
| 17 | -env: |
|
| 18 | -# Hier kannst du einen Default-Name definieren, der in die Artefakte wandert |
|
| 19 | - APP_VERSION: ${{ github.ref_name }} |
|
| 20 | - GH_TOKEN: ${{ secrets.RELEASE_TOKEN }} |
|
| 21 | -TARGET_REPO: owner/target-repo |
|
| 22 | - TAG: ${{ github.ref_name }} |
|
| 23 | -REGISTRY: ghcr.io |
|
| 24 | - IMAGE_NAME: ${{ github.repository }}-2 |
|
| 25 | - | |
| 26 | -jobs: |
|
| 27 | - | |
| 28 | -# Job 1: Automatisches Semver Tagging |
|
| 29 | -# create-version-tag: |
|
| 30 | -# name: Create Version Tag |
|
| 31 | -# # runs-on: ubuntu-latest |
|
| 32 | -# # runs-on: [self-hosted, macbook] |
|
| 33 | -# runs-on: [self-hosted] |
|
| 34 | -# outputs: |
|
| 35 | - # new_tag: ${{ steps.tag_version.outputs.new_tag }} |
|
| 36 | - # changelog: ${{ steps.tag_version.outputs.changelog }} |
|
| 37 | -# permissions: |
|
| 38 | -# contents: write |
|
| 39 | -# steps: |
|
| 40 | -# - name: Checkout |
|
| 41 | -# uses: actions/checkout@v6 |
|
| 42 | -# with: |
|
| 43 | -# fetch-depth: 0 |
|
| 44 | - | |
| 45 | -# - name: Bump version and push tag |
|
| 46 | -# id: tag_version |
|
| 47 | -# uses: mathieudutour/github-tag-action@v6.2 |
|
| 48 | -# with: |
|
| 49 | - # github_token: ${{ secrets.GITHUB_TOKEN }} |
|
| 50 | -# default_bump: patch |
|
| 51 | -# release_branches: main |
|
| 52 | -# # fix: = patch (0.0.1) |
|
| 53 | -# # feat: = minor (0.1.0) |
|
| 54 | -# # BREAKING CHANGE: = major (1.0.0) |
|
| 55 | - | |
| 56 | -# - name: Show new version |
|
| 57 | -# run: | |
|
| 58 | - # echo "New version: ${{ steps.tag_version.outputs.new_tag }}" |
|
| 59 | - # echo "Changelog: ${{ steps.tag_version.outputs.changelog }}" |
|
| 60 | - | |
| 61 | -create-version-tag: |
|
| 62 | -uses: 9it-full-service/shared-workflows/.github/workflows/prepare.yml@main |
|
| 63 | -with: |
|
| 64 | - version_override: ${{ github.event.inputs.version || '' }} |
|
| 65 | -default_version: 'dev' |
|
| 66 | - | |
| 67 | -build: |
|
| 68 | -runs-on: [ arc-runner-set ] |
|
| 69 | -# runs-on: [ self-hosted ] |
|
| 70 | -needs: [ "create-version-tag" ] |
|
| 71 | -strategy: |
|
| 72 | -fail-fast: false |
|
| 73 | -matrix: |
|
| 74 | -goos: [linux, darwin, windows] |
|
| 75 | -goarch: [amd64, arm64] |
|
| 76 | -exclude: |
|
| 77 | -- goos: windows |
|
| 78 | -goarch: amd64 |
|
| 79 | - | |
| 80 | -steps: |
|
| 81 | -- uses: actions/checkout@v6 |
|
| 82 | - | |
| 83 | -- name: Setup Go |
|
| 84 | -uses: actions/setup-go@v6 |
|
| 85 | -with: |
|
| 86 | -go-version: '1.25' |
|
| 87 | -cache: true |
|
| 88 | - | |
| 89 | -# - name: Print build matrix |
|
| 90 | -# run: | |
|
| 91 | - # echo "GOOS=${{ matrix.goos }}" |
|
| 92 | - # echo "GOARCH=${{ matrix.goarch }}" |
|
| 93 | - # echo "TAG=${{ github.ref_name }}" |
|
| 94 | - | |
| 95 | -- name: Set build timestamp |
|
| 96 | -id: timestamp |
|
| 97 | -run: echo "BUILD_TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_OUTPUT |
|
| 98 | - | |
| 99 | -- name: Print build matrix |
|
| 100 | -run: | |
|
| 101 | - echo "GOOS=${{ matrix.goos }}" |
|
| 102 | - echo "GOARCH=${{ matrix.goarch }}" |
|
| 103 | - echo "TAG=${{ needs.create-version-tag.outputs.version }}" |
|
| 104 | - echo "VERSION=${{ needs.create-version-tag.outputs.version }}" |
|
| 105 | - echo "COMMIT=${{ github.sha }}" |
|
| 106 | - echo "BUILD_TIMESTAMP=${{ steps.timestamp.outputs.BUILD_TIMESTAMP }}" |
|
| 107 | - | |
| 108 | -- name: Build quilldrop |
|
| 109 | -env: |
|
| 110 | - GOOS: ${{ matrix.goos }} |
|
| 111 | - GOARCH: ${{ matrix.goarch }} |
|
| 112 | - VERSION: ${{ needs.create-version-tag.outputs.version }} |
|
| 113 | - COMMIT: ${{ github.sha }} |
|
| 114 | - BUILD_TIMESTAMP: ${{ steps.timestamp.outputs.BUILD_TIMESTAMP }} |
|
| 115 | -run: | |
|
| 116 | -set -euo pipefail |
|
| 117 | -mkdir -p dist |
|
| 118 | - BIN_NAME="quilldrop-${GOOS}-${GOARCH}" |
|
| 119 | - OUT="dist/${BIN_NAME}" |
|
| 120 | -# Windows: .exe |
|
| 121 | - if [ "${GOOS}" = "windows" ]; then OUT="${OUT}.exe"; fi |
|
| 122 | -# Build (im Unterordner) |
|
| 123 | -(cd . && CGO_ENABLED=0 go build -trimpath -ldflags="-s -w \ |
|
| 124 | - -X 'main.version=${VERSION}' \ |
|
| 125 | - -X 'main.commit=${COMMIT}' \ |
|
| 126 | - -X 'main.date=${BUILD_TIMESTAMP}'" -o "${OUT}") |
|
| 127 | -# go mod init quilldrop && go mod tidy && \ |
|
| 128 | -go mod tidy && \ |
|
| 129 | -# CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo \ |
|
| 130 | -# -ldflags="-s -w \ |
|
| 131 | - # -X 'main.version=${VERSION}' \ |
|
| 132 | - # -X 'main.commit=${COMMIT}' \ |
|
| 133 | - # -X 'main.date=${BUILD_TIMESTAMP}'" \ |
|
| 134 | -# -o vm-tracker-api main.go |
|
| 135 | -# Paket |
|
| 136 | - if [[ "${OUT}" == *.exe ]]; then |
|
| 137 | - (cd dist && zip "${BIN_NAME}.zip" "${BIN_NAME}.exe") |
|
| 138 | -else |
|
| 139 | - (cd dist && tar -czf "${BIN_NAME}.tar.gz" "${BIN_NAME}") |
|
| 140 | -fi |
|
| 141 | - | |
| 142 | -# - name: Build vm-tracker-client |
|
| 143 | -# env: |
|
| 144 | - # GOOS: ${{ matrix.goos }} |
|
| 145 | - # GOARCH: ${{ matrix.goarch }} |
|
| 146 | - # VERSION: ${{ needs.create-version-tag.outputs.version }} # ← hinzufügen |
|
| 147 | - # COMMIT: ${{ github.sha }} # ← hinzufügen |
|
| 148 | - # # BUILD_TIMESTAMP: ${{ github.event.head_commit.timestamp }} |
|
| 149 | -# BUILD_TIMESTAMP: $(date -u +%Y-%m-%dT%H:%M:%SZ) |
|
| 150 | -# run: | |
|
| 151 | -# set -euo pipefail |
|
| 152 | -# mkdir -p dist |
|
| 153 | - # BIN_NAME="quilldrop-${GOOS}-${GOARCH}" |
|
| 154 | - # OUT="dist/${BIN_NAME}" |
|
| 155 | - # if [ "${GOOS}" = "windows" ]; then OUT="${OUT}.exe"; fi |
|
| 156 | -# (cd . && CGO_ENABLED=0 go build -trimpath -ldflags="-s -w \ |
|
| 157 | - # -X 'main.version=${VERSION}' \ |
|
| 158 | - # -X 'main.commit=${COMMIT}' \ |
|
| 159 | - # -X 'main.date=${BUILD_TIMESTAMP}'" -o "../${OUT}") |
|
| 160 | - # if [[ "${OUT}" == *.exe ]]; then |
|
| 161 | - # (cd dist && zip "${BIN_NAME}.zip" "${BIN_NAME}.exe") |
|
| 162 | -# else |
|
| 163 | - # (cd dist && tar -czf "${BIN_NAME}.tar.gz" "${BIN_NAME}") |
|
| 164 | -# fi |
|
| 165 | - | |
| 166 | -- name: Checksums erzeugen |
|
| 167 | -run: | |
|
| 168 | -set -euo pipefail |
|
| 169 | -cd dist |
|
| 170 | -# Ein Checksum-File pro Matrix-Kombination |
|
| 171 | - # FILE="CHECKSUMS-${{ env.APP_VERSION }}-${{ matrix.goos }}-${{ matrix.goarch }}.txt" |
|
| 172 | - FILE="CHECKSUMS-${{ needs.create-version-tag.outputs.version }}-${{ matrix.goos }}-${{ matrix.goarch }}.txt" |
|
| 173 | -shopt -s nullglob |
|
| 174 | -for f in *.tar.gz *.zip; do |
|
| 175 | -sha256sum "$f" >> "$FILE" |
|
| 176 | -done |
|
| 177 | -cat "$FILE" |
|
| 178 | - | |
| 179 | -- name: Upload artifacts (unique per matrix) |
|
| 180 | -uses: actions/upload-artifact@v5 |
|
| 181 | -with: |
|
| 182 | - name: release-bundles-${{ matrix.goos }}-${{ matrix.goarch }}-${{ github.run_attempt }} |
|
| 183 | -path: | |
|
| 184 | -dist/*.tar.gz |
|
| 185 | -dist/*.zip |
|
| 186 | -dist/CHECKSUMS-*.txt |
|
| 187 | -if-no-files-found: error |
|
| 188 | -compression-level: 6 |
|
| 189 | - | |
| 190 | -release: |
|
| 191 | -needs: [ "build", "create-version-tag" ] |
|
| 192 | -runs-on: arc-runner-set |
|
| 193 | -# runs-on: [ self-hosted ] |
|
| 194 | -steps: |
|
| 195 | -- name: Download all build artifacts (merged) |
|
| 196 | -uses: actions/download-artifact@v6 |
|
| 197 | -with: |
|
| 198 | -pattern: release-bundles-* |
|
| 199 | -merge-multiple: true |
|
| 200 | -path: dist |
|
| 201 | - | |
| 202 | -- name: Übersicht |
|
| 203 | -run: ls -la dist |
|
| 204 | - | |
| 205 | -# --- Option A: Release in anderes Repo via gh CLI --- |
|
| 206 | -- name: Create release in target repo |
|
| 207 | -env: |
|
| 208 | - GH_TOKEN: ${{ secrets.RELEASE_TOKEN }} # 👈 wichtig: GH_TOKEN, nicht RELEASE_TOKEN |
|
| 209 | -TARGET_REPO: 9it-full-service/quilldrop |
|
| 210 | - TAG: ${{ needs.create-version-tag.outputs.version }} |
|
| 211 | - # TAG: ${{ github.ref_name }} |
|
| 212 | -run: | |
|
| 213 | -set -euo pipefail |
|
| 214 | -gh release create "$TAG" \ |
|
| 215 | ---repo "$TARGET_REPO" \ |
|
| 216 | ---title "$TAG" \ |
|
| 217 | - --notes "Automated release from ${GITHUB_REPOSITORY}@${GITHUB_SHA}" \ |
|
| 218 | -|| echo "Release exists, continue to upload assets." |
|
| 219 | - | |
| 220 | -gh release upload "$TAG" dist/* --repo "$TARGET_REPO" --clobber |
|
| 221 | - | |
| 222 | -# build-and-push-docker: |
|
| 223 | -# name: Build Multi-arch Docker |
|
| 224 | -# needs: [create-version-tag, build] |
|
| 225 | -# runs-on: [self-hosted] |
|
| 226 | -# permissions: |
|
| 227 | -# contents: read |
|
| 228 | -# packages: write |
|
| 229 | -# steps: |
|
| 230 | -# - name: Checkout repository |
|
| 231 | -# uses: actions/checkout@v6 |
|
| 232 | - | |
| 233 | -# # Alle Artifacts herunterladen |
|
| 234 | -# - name: Download build artifacts |
|
| 235 | -# uses: actions/download-artifact@v6 |
|
| 236 | -# with: |
|
| 237 | -# path: ./artifacts |
|
| 238 | - | |
| 239 | -# # Übersicht was heruntergeladen wurde |
|
| 240 | -# - name: List downloaded artifacts |
|
| 241 | -# run: | |
|
| 242 | -# echo "=== Downloaded artifacts ===" |
|
| 243 | -# ls -laR artifacts/ |
|
| 244 | - | |
| 245 | -# # Binaries für Docker vorbereiten |
|
| 246 | -# - name: Prepare binaries for Docker |
|
| 247 | -# run: | |
|
| 248 | -# set -euo pipefail |
|
| 249 | - # mkdir -p docker-bin/{amd64,arm64} |
|
| 250 | - |
|
| 251 | -# # Suche und extrahiere amd64 binary |
|
| 252 | -# echo "Searching for amd64 binary..." |
|
| 253 | -# AMD64_TAR=$(find artifacts -name "vm-tracker-api-linux-amd64.tar.gz" -type f | head -1) |
|
| 254 | -# if [ -n "$AMD64_TAR" ]; then |
|
| 255 | -# echo "Found: $AMD64_TAR" |
|
| 256 | -# tar -xzf "$AMD64_TAR" -C docker-bin/amd64/ |
|
| 257 | -# mv docker-bin/amd64/vm-tracker-api-linux-amd64 docker-bin/amd64/vm-tracker-api |
|
| 258 | -# chmod +x docker-bin/amd64/vm-tracker-api |
|
| 259 | -# else |
|
| 260 | -# echo "ERROR: amd64 binary not found!" |
|
| 261 | -# exit 1 |
|
| 262 | -# fi |
|
| 263 | - |
|
| 264 | -# # Suche und extrahiere arm64 binary |
|
| 265 | -# echo "Searching for arm64 binary..." |
|
| 266 | -# ARM64_TAR=$(find artifacts -name "vm-tracker-api-linux-arm64.tar.gz" -type f | head -1) |
|
| 267 | -# if [ -n "$ARM64_TAR" ]; then |
|
| 268 | -# echo "Found: $ARM64_TAR" |
|
| 269 | -# tar -xzf "$ARM64_TAR" -C docker-bin/arm64/ |
|
| 270 | -# mv docker-bin/arm64/vm-tracker-api-linux-arm64 docker-bin/arm64/vm-tracker-api |
|
| 271 | -# chmod +x docker-bin/arm64/vm-tracker-api |
|
| 272 | -# else |
|
| 273 | -# echo "ERROR: arm64 binary not found!" |
|
| 274 | -# exit 1 |
|
| 275 | -# fi |
|
| 276 | - |
|
| 277 | -# echo "=== Prepared binaries ===" |
|
| 278 | -# ls -la docker-bin/*/ |
|
| 279 | -# file docker-bin/*/vm-tracker-api |
|
| 280 | - | |
| 281 | -# - name: Set up QEMU |
|
| 282 | -# uses: docker/setup-qemu-action@v3 |
|
| 283 | - | |
| 284 | -# - name: Set up Docker Buildx |
|
| 285 | -# uses: docker/setup-buildx-action@v3 |
|
| 286 | - | |
| 287 | -# - name: Log in to Container Registry |
|
| 288 | -# uses: docker/login-action@v3 |
|
| 289 | -# with: |
|
| 290 | - # registry: ${{ env.REGISTRY }} |
|
| 291 | - # username: ${{ github.actor }} |
|
| 292 | - # password: ${{ secrets.GITHUB_TOKEN }} |
|
| 293 | - | |
| 294 | -# - name: Set build metadata |
|
| 295 | -# id: meta |
|
| 296 | -# run: | |
|
| 297 | - # echo "VERSION=${{ needs.create-version-tag.outputs.new_tag }}" >> $GITHUB_ENV |
|
| 298 | - # echo "COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV |
|
| 299 | -# echo "BUILD_TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_ENV |
|
| 300 | - | |
| 301 | -# - name: Build and push Docker image |
|
| 302 | -# uses: docker/build-push-action@v6 |
|
| 303 | -# with: |
|
| 304 | -# context: . |
|
| 305 | -# platforms: linux/amd64,linux/arm64 |
|
| 306 | -# push: true |
|
| 307 | -# tags: | |
|
| 308 | - # ghcr.io/9it-full-service/vm-tracker-api:${{ needs.create-version-tag.outputs.new_tag }} |
|
| 309 | -# ghcr.io/9it-full-service/vm-tracker-api:latest |
|
| 310 | -# labels: | |
|
| 311 | - # org.opencontainers.image.version=${{ needs.create-version-tag.outputs.new_tag }} |
|
| 312 | - # org.opencontainers.image.created=${{ env.BUILD_TIMESTAMP }} |
|
| 313 | - # org.opencontainers.image.revision=${{ github.sha }} |
|
| 314 | -# build-args: | |
|
| 315 | - # VERSION=${{ env.VERSION }} |
|
| 316 | - # COMMIT=${{ env.COMMIT }} |
|
| 317 | - # BUILD_TIMESTAMP=${{ env.BUILD_TIMESTAMP }} |
|
| 318 | -# # cache-from: type=gha |
|
| 319 | -# # cache-to: type=gha,mode=max |
|
| 320 | -# provenance: false |
|
| 321 | - | |
| 322 | -# # - name: Clean up Docker images |
|
| 323 | -# # if: always() # Also run in case of errors |
|
| 324 | -# # run: | |
|
| 325 | -# # # remove dangling images |
|
| 326 | - # # docker rmi ghcr.io/9it-full-service/vm-tracker-api:${{ needs.create-version-tag.outputs.new_tag }} |
|
| 327 | -# # docker rmi ghcr.io/9it-full-service/vm-tracker-api:latest |
|
| 328 | -# # # docker image prune -f |
|
| 329 | - |