3 Commits

Author SHA1 Message Date
Dreaded_X 790f98a989 chore(actions): Publish Arch Linux package
CI / cargo shear (pull_request) Successful in 5m18s
CI / prek (pull_request) Successful in 5m24s
2026-04-05 19:51:42 +02:00
Dreaded_X 417145188c feat(package): Added PKGBUILD 2026-04-05 19:42:01 +02:00
Dreaded_X 2abee257e3 chore(license): Add GPL license 2026-04-05 19:41:57 +02:00
7 changed files with 30 additions and 91 deletions
+4 -8
View File
@@ -15,13 +15,9 @@ jobs:
permissions: permissions:
issues: write issues: write
steps: steps:
- name: Checkout - uses: actions/checkout@v6
uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@nightly
- name: Install rust toolchain - uses: Swatinem/rust-cache@v2
uses: dtolnay/rust-toolchain@nightly - uses: rustsec/audit-check@v2.0.0
- name: Setup rust cache
uses: Swatinem/rust-cache@v2
- name: Audit check
uses: rustsec/audit-check@v2.0.0
with: with:
token: ${{ secrets.GITEA_TOKEN }} token: ${{ secrets.GITEA_TOKEN }}
+8 -16
View File
@@ -12,29 +12,21 @@ jobs:
name: prek name: prek
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - uses: actions/checkout@v6
uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@nightly
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@nightly
with: with:
components: rustfmt, clippy components: rustfmt, clippy
- name: Setup rust cache - uses: Swatinem/rust-cache@v2
uses: Swatinem/rust-cache@v2
- uses: j178/prek-action@v2 - uses: j178/prek-action@v2
cargo-shear: cargo-shear:
name: cargo shear name: cargo shear
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - uses: actions/checkout@v6
uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@nightly
- name: Install rust toolchain - uses: Swatinem/rust-cache@v2
uses: dtolnay/rust-toolchain@nightly - uses: taiki-e/install-action@v2
- name: Setup rust cache
uses: Swatinem/rust-cache@v2
- name: Install cargo shear
uses: taiki-e/install-action@v2
with: with:
tool: cargo-shear tool: cargo-shear
- name: cargo shear - run: cargo shear --deny-warnings
run: cargo shear --deny-warnings
+8 -17
View File
@@ -14,17 +14,13 @@ jobs:
pull-requests: read pull-requests: read
steps: steps:
- &checkout - &checkout
name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
persist-credentials: false persist-credentials: false
- name: Install rust toolchain - uses: dtolnay/rust-toolchain@nightly
uses: dtolnay/rust-toolchain@nightly - uses: Swatinem/rust-cache@v2
- name: Setup rust cache - uses: taiki-e/install-action@v2
uses: Swatinem/rust-cache@v2
- name: Install release-plz
uses: taiki-e/install-action@v2
with: with:
tool: release-plz tool: release-plz
- &git-setup - &git-setup
@@ -33,8 +29,7 @@ jobs:
git config user.name "Release-plz" git config user.name "Release-plz"
git config user.email "release-plz@noreply.huizinga.dev" git config user.email "release-plz@noreply.huizinga.dev"
git config url.https://${{ gitea.actor }}:${{ secrets.GITEA_TOKEN }}@git.huizinga.dev/.insteadOf https://git.huizinga.dev/ git config url.https://${{ gitea.actor }}:${{ secrets.GITEA_TOKEN }}@git.huizinga.dev/.insteadOf https://git.huizinga.dev/
- name: release-plz release - env:
env:
CARGO_REGISTRIES_INFRA_TOKEN: "Bearer ${{ secrets.REGISTRY_TOKEN }}" CARGO_REGISTRIES_INFRA_TOKEN: "Bearer ${{ secrets.REGISTRY_TOKEN }}"
run: release-plz release --git-token "${{ secrets.GITEA_TOKEN }}" --forge gitea --dry-run run: release-plz release --git-token "${{ secrets.GITEA_TOKEN }}" --forge gitea --dry-run
@@ -49,14 +44,10 @@ jobs:
pull-requests: write pull-requests: write
steps: steps:
- *checkout - *checkout
- name: Install rust toolchain - uses: dtolnay/rust-toolchain@nightly
uses: dtolnay/rust-toolchain@nightly - uses: Swatinem/rust-cache@v2
- name: Setup rust cache - uses: taiki-e/install-action@v2
uses: Swatinem/rust-cache@v2
- name: Install release-plz
uses: taiki-e/install-action@v2
with: with:
tool: release-plz tool: release-plz
- *git-setup - *git-setup
- name: release-plz release-pr - run: release-plz release-pr --git-token "${{ secrets.GITEA_TOKEN }}" --forge gitea
run: release-plz release-pr --git-token "${{ secrets.GITEA_TOKEN }}" --forge gitea
+4 -13
View File
@@ -3,23 +3,14 @@ name: Release
on: on:
push: push:
tags: tags:
- "v*" - "*"
jobs: jobs:
archlinux: archlinux:
name: Arch Linux name: Arch Linux
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
packages: write
steps: steps:
- name: Checkout - uses: actions/checkout@v2
uses: actions/checkout@v6 - uses: heyhusen/archlinux-package-action@v3
- name: Build package
uses: https://git.huizinga.dev/infra/archlinux-package-action@v4
with: with:
path: . pkgver: ${{ gitea.ref_name }}
- run: ls | grep -E 'crete-[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-.*.pkg.tar.zst'
- name: Upload package
run: curl --user ${{ gitea.actor }}:${{ secrets.GITEA_TOKEN }} \
--upload-file="$(ls | grep -E 'crete-[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-.*.pkg.tar.zst')" \
https://git.huizinga.dev/api/packages/infra/arch/core
-1
View File
@@ -4,7 +4,6 @@ version = "0.1.0"
edition = "2024" edition = "2024"
default-run = "crete" default-run = "crete"
publish = ["infra"] publish = ["infra"]
license = "GPL-3.0-or-later"
[workspace] [workspace]
members = ["xtask"] members = ["xtask"]
+6 -10
View File
@@ -1,19 +1,15 @@
# Maintainer: Tim Huizinga <tim@huizinga.dev> # Maintainer: Tim Huizinga <tim@huizinga.dev>
pkgname=crete pkgname=crete
pkgver=dummy pkgver=0.0.0
pkgrel=1 pkgrel=1
pkgdesc='A tool that takes node and cluster configs and uses it to generate talos configs and render jinja templates' pkgdesc='A tool that takes node and cluster configs and uses it to generate talos configs and render jinja templates'
url='https://git.huizinga.dev/infra/crete' url='https://git.huizinga.dev/infra/crete'
license=('GPL-3.0-or-later') license=('GPL')
makedepends=('cargo-nightly') makedepends=('cargo-nightly')
depends=() depends=()
arch=('i686' 'x86_64' 'armv6h' 'armv7h') arch=('i686' 'x86_64' 'armv6h' 'armv7h')
source=('LICENSE') source=()
sha256sums=('4bffc7da729013886ae68623c0d6145201b20a495879b589990953b2a27e1fbd') b2sums=()
pkgver() {
cargo info $pkgname | grep -Po '^version: \K[\d\.]+'
}
prepare() { prepare() {
export RUSTUP_TOOLCHAIN=nightly export RUSTUP_TOOLCHAIN=nightly
@@ -28,7 +24,7 @@ build() {
} }
package() { package() {
install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" "LICENSE" install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname" install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
install -Dm0644 -t "$pkgdir/usr/share/zsh/site-functions" "_$pkgname" install -Dm0755 -t "$pkgdir/usr/share/zsh/site-functions" "_$pkgname"
} }
-26
View File
@@ -5,32 +5,6 @@ and render jinja templates.
## Installation ## Installation
### Arch
First import the verification key:
```bash
wget https://git.huizinga.dev/api/packages/infra/arch/repository.key -O /tmp/repository.key
sudo pacman-key --add /tmp/repository.key
sudo pacman-key --lsign-key $(gpg --show-keys /tmp/repository.key | sed -n 2p)
```
And add the following to `/etc/pacman.conf`:
```ini
[infra]
SigLevel = Required
Server = https://git.huizinga.dev/api/packages/infra/arch/core/$arch
```
You can then install `crete` by running:
```bash
sudo pacman -Sy crete
```
### Cargo install
Add the following to `~/.cargo.config.toml`: Add the following to `~/.cargo.config.toml`:
```toml ```toml