Some checks failed
Build and Publish Docker Images / build-and-push (push) Failing after 6m30s
Test Docker Compose Setup / test-compose (push) Failing after 30s
Test Docker Compose Setup / lint-dockerfiles (push) Failing after 34s
Test Docker Compose Setup / validate-compose (push) Failing after 12s
Build and Publish Docker Images / security-scan (push) Has been skipped
Build and Publish Docker Images / notify (push) Failing after 7s
95 lines
2.8 KiB
YAML
95 lines
2.8 KiB
YAML
name: Create Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
env:
|
|
REGISTRY: docker.io
|
|
IMAGE_NAME_DISCORD_BOT: uptime-kuma-discord-bot
|
|
IMAGE_NAME_WEB_BACKEND: uptime-kuma-web-backend
|
|
|
|
jobs:
|
|
create-release:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Extract version from tag
|
|
id: version
|
|
run: |
|
|
VERSION=${GITHUB_REF#refs/tags/}
|
|
VERSION=${VERSION#v}
|
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
echo "tag=v$VERSION" >> $GITHUB_OUTPUT
|
|
|
|
- name: Generate changelog
|
|
id: changelog
|
|
run: |
|
|
# Get commits since last tag
|
|
if git describe --tags --abbrev=0 HEAD~1 >/dev/null 2>&1; then
|
|
PREV_TAG=$(git describe --tags --abbrev=0 HEAD~1)
|
|
echo "Changes since $PREV_TAG:"
|
|
git log --pretty=format:"- %s (%h)" $PREV_TAG..HEAD
|
|
else
|
|
echo "Initial release"
|
|
git log --pretty=format:"- %s (%h)"
|
|
fi > CHANGELOG.md
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
tag_name: ${{ steps.version.outputs.tag }}
|
|
name: Release ${{ steps.version.outputs.tag }}
|
|
body: |
|
|
## What's Changed
|
|
|
|
${{ steps.changelog.outputs.content }}
|
|
|
|
## Docker Images
|
|
|
|
### Discord Bot
|
|
```bash
|
|
docker pull ${{ env.REGISTRY }}/${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME_DISCORD_BOT }}:${{ steps.version.outputs.version }}
|
|
docker pull ${{ env.REGISTRY }}/${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME_DISCORD_BOT }}:latest
|
|
```
|
|
|
|
### Web Backend
|
|
```bash
|
|
docker pull ${{ env.REGISTRY }}/${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME_WEB_BACKEND }}:${{ steps.version.outputs.version }}
|
|
docker pull ${{ env.REGISTRY }}/${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME_WEB_BACKEND }}:latest
|
|
```
|
|
|
|
## Quick Start
|
|
|
|
```bash
|
|
# Clone the repository
|
|
git clone <repository-url>
|
|
cd UptimeKuma-DiscordBot
|
|
|
|
# Copy environment template
|
|
cp env.example .env
|
|
|
|
# Edit .env with your values
|
|
# Then start with Docker Compose
|
|
docker-compose up -d
|
|
```
|
|
|
|
See [DOCKER_SETUP.md](DOCKER_SETUP.md) for detailed instructions.
|
|
files: |
|
|
CHANGELOG.md
|
|
draft: false
|
|
prerelease: false
|
|
|
|
- name: Update Docker Hub description
|
|
if: success()
|
|
run: |
|
|
echo "🎉 Release ${{ steps.version.outputs.tag }} created successfully!"
|
|
echo "Docker images will be automatically built and pushed by the docker-build workflow."
|