Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
51 changes: 51 additions & 0 deletions .github/workflows/pack-build-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "PACK: Build Check"

on:
push:
branches: [ main ]
paths:
- 'pack/**'
- '.github/workflows/pack-build-check.yaml'
pull_request:
branches: [ main ]
paths:
- 'pack/**'
- '.github/workflows/pack-build-check.yaml'
workflow_call:
workflow_dispatch:

jobs:
build-check:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
pack/target
key: ${{ runner.os }}-cargo-${{ hashFiles('pack/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Check formatting
working-directory: pack
run: cargo fmt --check

- name: Run clippy
working-directory: pack
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Check compilation
working-directory: pack
run: cargo check --all-targets --all-features
45 changes: 45 additions & 0 deletions .github/workflows/pack-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "PACK: Release"

on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
type: string

jobs:
build-check:
uses: ./.github/workflows/pack-build-check.yaml

release:
needs: [ build-check ]
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4

- name: Validate version format
run: |
if ! echo "${{ inputs.version }}" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then
echo "Error: Version must be in semver format (e.g., 1.0.0)"
exit 1
fi

- name: Check tag does not already exist
run: |
if git ls-remote --tags origin | grep -q "refs/tags/pack-v${{ inputs.version }}$"; then
echo "Error: Tag pack-v${{ inputs.version }} already exists"
exit 1
fi

- name: Create tag and GitHub release
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
with:
tag_name: pack-v${{ inputs.version }}
name: "PACK v${{ inputs.version }}"
generate_release_notes: true
make_latest: true
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ A collection of utilities used by SUSE Edge Support.
|------|-------------|
| 🦕 [nessie](./nessie/) | Log and configuration collector for SUSE Edge clusters |
| 📋 [components-versions](./components-versions/) | Version reporter for Helm charts, pods, and nodes |
| 📦 [pack](./pack/) | Path Archiver Collection Kit — collects arbitrary host paths into a tar.gz for upload and investigation |

---

Expand Down
17 changes: 0 additions & 17 deletions buttcrack/Cargo.toml

This file was deleted.

Loading
Loading