2024-11-30 20:25:32 +02:00
|
|
|
name: Manual Release and Docker Image Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
version:
|
|
|
|
description: "Version for the release (e.g., v1.0.0)"
|
|
|
|
required: true
|
|
|
|
default: "v1.0.0"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
name: Create Release and Build Docker Image
|
|
|
|
runs-on: ubuntu-latest-root
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout Repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Login to Docker Registry
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
2024-12-07 16:10:07 +02:00
|
|
|
registry: git.vavakado.xyz
|
|
|
|
username: vavakado
|
|
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
2024-11-30 20:25:32 +02:00
|
|
|
|
|
|
|
- name: Create Git Tag
|
|
|
|
run: |
|
|
|
|
git tag ${{ github.event.inputs.version }}
|
|
|
|
git push origin ${{ github.event.inputs.version }}
|
|
|
|
|
2024-12-07 16:05:37 +02:00
|
|
|
# - name: Create Release
|
|
|
|
# run: |
|
|
|
|
# curl -X POST -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
|
|
|
|
# -H "Content-Type: application/json" \
|
|
|
|
# -d '{
|
|
|
|
# "tag_name": "${{ github.event.inputs.version }}",
|
|
|
|
# "target_commitish": "main", # Change if your default branch is different
|
|
|
|
# "name": "${{ github.event.inputs.version }}",
|
|
|
|
# "body": "Release for version ${{ github.event.inputs.version }}",
|
|
|
|
# "draft": false,
|
|
|
|
# "prerelease": false
|
|
|
|
# }' \
|
|
|
|
# https://git.vavakado.xyz/api/v1/repos/${{ gitea.repository_owner }}/${{ gitea.repository }}/releases
|
|
|
|
|
2024-11-30 20:25:32 +02:00
|
|
|
- name: Create Release
|
2024-12-07 16:05:37 +02:00
|
|
|
uses: actions/forjego-release@v2
|
|
|
|
with:
|
|
|
|
direction: upload
|
|
|
|
tag: ${{ github.event.inputs.version }}
|
|
|
|
name: ${{ github.event.inputs.version }}
|
|
|
|
token: ${{ secrets.RELEASE_TOKEN }}
|
|
|
|
release-notes-assistant: true
|
|
|
|
release-dir: ./rel/
|
2024-11-30 20:25:32 +02:00
|
|
|
|
|
|
|
- name: Build Docker Image
|
|
|
|
run: |
|
|
|
|
docker build -t git.vavakado.xyz/${{ gitea.repository_owner }}/exmr:${{ github.event.inputs.version }} .
|
2024-11-30 22:49:44 +02:00
|
|
|
docker tag git.vavakado.xyz/vavakado/exmr:${{ github.event.inputs.version }} git.vavakado.xyz/vavakado/exmr:latest
|
|
|
|
docker tag git.vavakado.xyz/vavakado/exmr:${{ github.event.inputs.version }} git.vavakado.xyz/vavakado/exmr:stable
|
2024-11-30 20:25:32 +02:00
|
|
|
|
|
|
|
- name: Push Docker Image
|
|
|
|
run: |
|
|
|
|
docker push git.vavakado.xyz/${{ gitea.repository_owner }}/exmr:${{ github.event.inputs.version }}
|
2024-11-30 22:49:44 +02:00
|
|
|
docker push git.vavakado.xyz/vavakado/exmr:latest
|
|
|
|
docker push git.vavakado.xyz/vavakado/exmr:stable
|