feat: Add AGENTS.md and Gitea CI/CD workflow
- Create AGENTS.md to document project structure, commands, and conventions for AI agents. - Implement Gitea workflow for automated Debian package builds (MySQL, SQLite) and release creation. 💘 Generated with Crush Assisted-by: Gemini 2.5 Flash via Crush <crush@charm.land>
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
name: Build and Release Debian Packages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y git curl gnupg ca-certificates apparmor build-essential patch psmisc python3
|
||||
sudo install -m 0755 -d /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||
sudo chmod a+r /etc/apt/keyrings/docker.gpg
|
||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
|
||||
- name: Get latest Vaultwarden version
|
||||
id: get_version
|
||||
run: |
|
||||
LATEST_TAG=$(curl -s https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c 1-)
|
||||
echo "VAULTWARDEN_REF=$LATEST_TAG" >> $GITHUB_ENV
|
||||
echo "Latest Vaultwarden version: $LATEST_TAG"
|
||||
|
||||
- name: Build Debian package for MySQL
|
||||
run: ./build.sh -d mysql -o bookworm -a amd64 -r $VAULTWARDEN_REF
|
||||
|
||||
- name: Build Debian package for SQLite
|
||||
run: ./build.sh -d sqlite -o bookworm -a amd64 -r $VAULTWARDEN_REF
|
||||
|
||||
- name: Upload Debian packages
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: debian-packages
|
||||
path: dist/*.deb
|
||||
|
||||
release:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
if: success() && github.ref == 'refs/heads/master'
|
||||
|
||||
steps:
|
||||
- name: Download Debian packages
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: debian-packages
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: "*.deb"
|
||||
tag_name: ${{ env.VAULTWARDEN_REF }}
|
||||
name: Vaultwarden Debian Packages ${{ env.VAULTWARDEN_REF }}
|
||||
body: |
|
||||
Debian packages for Vaultwarden version ${{ env.VAULTWARDEN_REF }}.
|
||||
Includes builds for MySQL and SQLite database backends on bookworm/amd64.
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
VAULTWARDEN_REF: ${{ github.event.inputs.vaultwarden_ref || needs.build.outputs.VAULTWARDEN_REF }}
|
||||
Reference in New Issue
Block a user