Files
alpine-packages/.gitea/workflows/build.yml
Joachim Schlöffel 50e8eaa62a
Some checks failed
Build Alpine Packages / build-and-publish (push) Has been cancelled
Cache Rust build artifacts for Alpine packages
2026-06-09 10:47:17 +02:00

61 lines
2.0 KiB
YAML

name: Build Alpine Packages
on:
push:
branches:
- master
- main
tags:
- "*"
pull_request:
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
container:
image: alpine:3.23
env:
ALPINE_VERSION: "3.23"
ALPINE_ARCHES: "x86_64 aarch64"
ALPINE_REGISTRY_BRANCH: "v3.23"
ALPINE_REGISTRY_REPOSITORY: "${{ vars.PACKAGE_NAME }}"
INSTANCE_URL: "${{ vars.INSTANCE_URL }}"
PACKAGE_OWNER: "${{ vars.PACKAGE_OWNER }}"
PACKAGE_USER: "${{ secrets.PACKAGE_USER }}"
PACKAGE_TOKEN: "${{ secrets.PACKAGE_TOKEN }}"
PACKAGER: "Joachim Schlöffel <me@joachim-schloeffel.com>"
CARGO_HOME: "/cache/public-alpine-packages/greptimedb/cargo"
RUSTUP_HOME: "/cache/public-alpine-packages/greptimedb/rustup"
CARGO_TARGET_DIR: "/cache/public-alpine-packages/greptimedb/target"
steps:
- name: Prepare Environment
run: |
apk add --no-cache --update abuild-rootbld alpine-sdk atools-apkbuild-lint bash ca-certificates curl doas git nodejs sudo tar
mkdir -p "$CARGO_HOME" "$RUSTUP_HOME" "$CARGO_TARGET_DIR"
chown 1000:1000 /cache /cache/public-alpine-packages /cache/public-alpine-packages/greptimedb "$CARGO_HOME" "$RUSTUP_HOME" "$CARGO_TARGET_DIR"
- name: Checkout
uses: actions/checkout@v3
- name: Build packages
run: |
scripts/apk/clean.sh
find packaging/alpine/local -mindepth 2 -maxdepth 2 -name APKBUILD -exec apkbuild-lint {} +
scripts/apk/ci-build.sh
scripts/apk/export-ci-assets.sh
scripts/apk/list-packages.sh
- name: Upload generated CI assets
uses: actions/upload-artifact@v3
with:
name: greptimedb-musl-binaries
path: packages/ci-assets/
- name: Smoke test
run: scripts/apk/ci-smoke.sh
- name: Publish Alpine packages
if: github.event_name != 'pull_request'
run: scripts/apk/publish-gitea.sh