docs: rewrite README and add CHANGELOG; build: package script and Gitea release workflow pushing to registry.familie-berner.de
This commit is contained in:
1 parent
9feb3fba86
commit
d8bf6ff475
5 files changed
+321
-41
No files matched your search
@@ -0,0 +1,69 @@
|
||||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build package
|
||||
run: |
|
||||
chmod +x tools/build-package.sh
|
||||
./tools/build-package.sh
|
||||
cat version.txt
|
||||
|
||||
- name: Upload workflow artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: vmmngr-package
|
||||
path: dist/
|
||||
|
||||
- name: Install oras
|
||||
run: |
|
||||
curl -sSL -o /tmp/oras.tgz \
|
||||
https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_linux_amd64.tar.gz
|
||||
tar -xzf /tmp/oras.tgz -C /tmp oras
|
||||
sudo install -m 0755 /tmp/oras /usr/local/bin/oras
|
||||
oras version
|
||||
|
||||
- name: Push to registry
|
||||
env:
|
||||
REGISTRY: registry.familie-berner.de
|
||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||
run: |
|
||||
set -eu
|
||||
VERSION=$(cat version.txt | tr -d '\n')
|
||||
PKG=$(ls dist/vmmngr-*.tar.gz | head -1)
|
||||
PKG_SUM="${PKG}.sha256"
|
||||
MEDIA="application/vnd.xigmanas.vmmngr.layer.v1.tar+gzip"
|
||||
|
||||
echo "$REGISTRY_TOKEN" | oras login "$REGISTRY" -u "$REGISTRY_USER" --password-stdin
|
||||
|
||||
for TAG in "$VERSION" latest; do
|
||||
echo "pushing $REGISTRY/xigmanas/vmmngr:$TAG"
|
||||
oras push "$REGISTRY/xigmanas/vmmngr:$TAG" \
|
||||
--artifact-type application/vnd.xigmanas.extension.v1 \
|
||||
"$PKG:$MEDIA" \
|
||||
"$PKG_SUM:application/vnd.xigmanas.sha256" \
|
||||
--annotation "org.opencontainers.image.version=$VERSION" \
|
||||
--annotation "org.opencontainers.image.title=vmmngr"
|
||||
done
|
||||
|
||||
- name: Summary
|
||||
run: |
|
||||
VERSION=$(cat version.txt | tr -d '\n')
|
||||
{
|
||||
echo "### vmmngr ${VERSION}"
|
||||
echo ""
|
||||
echo "Package: \`dist/vmmngr-${VERSION}.tar.gz\`"
|
||||
echo ""
|
||||
echo "Pull: \`oras pull registry.familie-berner.de/xigmanas/vmmngr:${VERSION}\`"
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
Reference in new issue
Block a user