47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
name: Docker Build & Push
|
|
run-name: Release ${{ gitea.ref_name }}
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Log in to Gitea Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: git.schamagusa.de
|
|
username: ${{ gitea.actor }}
|
|
password: ${{ secrets.RELEASE_TOKEN }}
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: |
|
|
git.schamagusa.de/${{ gitea.repository }}:${{ gitea.ref_name }}
|
|
git.schamagusa.de/${{ gitea.repository }}:latest
|
|
|
|
- name: Prepare release notes
|
|
run: |
|
|
sed "s|{{VERSION}}|${{ gitea.ref_name }}|g" CHANGELOG.md > release_notes.md
|
|
cat release_notes.md
|
|
|
|
- name: Create Release
|
|
uses: https://gitea.com/actions/gitea-release-action@main
|
|
with:
|
|
body_path: release_notes.md
|
|
prerelease: ${{ contains(gitea.ref_name, '-rc') || contains(gitea.ref_name, '-beta') || contains(gitea.ref_name, '-alpha') }}
|
|
files: |
|
|
example.docker-compose.yaml
|
|
example.env
|