Files
remnashop/.github/workflows/prod-docker-release.yml
Ilay 30e158973c fix: device deletion callback, branch variable, notifications
- fixed long callback_data for device deletion (use shortened HWID)
- fixed variable used to pass branch name during build
- improved error handling and logging when sending notifications
2025-12-22 09:03:07 +05:00

94 lines
3.0 KiB
YAML

name: Remnashop - Release
on:
release:
types: [published]
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: 🧾 Checkout main branch
uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.GITHUB_TOKEN }}
- name: 🔖 Get latest tag
id: latest-tag
uses: JinoArch/get-latest-tag@latest
- name: 🏷️ Define Build Args
id: vars
run: |
SHORT_SHA=$(git rev-parse --short HEAD)
BUILD_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
IMAGE_REPO="ghcr.io/${GITHUB_REPOSITORY}"
IMAGE_TAGS="${IMAGE_REPO}:latest,${IMAGE_REPO}:${GITHUB_REF_NAME}"
echo "image_tag=${IMAGE_TAGS}" >> $GITHUB_OUTPUT
echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT
echo "build_time=${BUILD_TIME}" >> $GITHUB_OUTPUT
echo "✅ Tags: ${IMAGE_TAGS}"
echo "✅ SHA: ${SHORT_SHA}"
- name: 🛠️ Set Up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: 🔐 Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: 🏗️ Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/snoups/remnashop:latest
ghcr.io/snoups/remnashop:${{ github.ref_name }}
build-args: |
BUILD_TIME=${{ steps.vars.outputs.build_time }}
BUILD_BRANCH=main
BUILD_COMMIT=${{ steps.vars.outputs.short_sha }}
BUILD_TAG=${{ github.ref_name }}
- name: 📦 Create GitHub Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
generate_release_notes: false
body: |
# 🛍 Remnashop ${{ github.ref_name }}
[![Telegram Group](https://img.shields.io/badge/public_group-white?style=social&logo=Telegram&logoColor=blue)](https://t.me/remna_shop)
[![Remnawave](https://img.shields.io/badge/remnawave-white?style=social&logo=Telegram&logoColor=blue)](https://t.me/+xQs17zMzwCY1NzYy)
---
- [Compare changes (${{ steps.latest-tag.outputs.previousTag }}...${{ steps.latest-tag.outputs.latestTag }})](https://github.com/snoups/remnashop/compare/${{ steps.latest-tag.outputs.previousTag }}...${{ steps.latest-tag.outputs.latestTag }})
---
## 🐳 Docker Images
### Latest:
```
ghcr.io/snoups/remnashop:latest
```
### Versioned:
```
ghcr.io/snoups/remnashop:${{ github.ref_name }}
```
draft: false
prerelease: false