Unified email reports

This commit is contained in:
Frank John Begornia
2026-01-02 01:19:07 +08:00
parent 2e1ad5526c
commit d0d82aa8e1
229 changed files with 7374 additions and 812 deletions

View File

@@ -0,0 +1,62 @@
name: Build and Push to Registry
on:
push:
tags:
- 'v*'
jobs:
build-push:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout code
shell: sh
run: |
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git /workspace/repo
cd /workspace/repo
git checkout $GITHUB_REF_NAME
- name: Extract version from tag
shell: sh
run: |
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Build Docker image
shell: sh
run: |
cd /workspace/repo
docker build -t email_reports_crew:${VERSION} .
docker tag email_reports_crew:${VERSION} email_reports_crew:latest
- name: Login to Docker Registry
shell: sh
env:
REGISTRY_URL: ${{ secrets.REGISTRY_URL }}
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
run: |
echo "$REGISTRY_PASSWORD" | docker login -u "$REGISTRY_USER" --password-stdin $REGISTRY_URL
- name: Tag and Push images
shell: sh
env:
REGISTRY_URL: ${{ secrets.REGISTRY_URL }}
run: |
docker tag email_reports_crew:${VERSION} ${REGISTRY_URL}/email_reports_crew:${VERSION}
docker tag email_reports_crew:${VERSION} ${REGISTRY_URL}/email_reports_crew:latest
docker push ${REGISTRY_URL}/email_reports_crew:${VERSION}
docker push ${REGISTRY_URL}/email_reports_crew:latest
echo "✓ Pushed images:"
echo " ${REGISTRY_URL}/email_reports_crew:${VERSION}"
echo " ${REGISTRY_URL}/email_reports_crew:latest"
- name: Cleanup
shell: sh
run: |
docker image prune -af
echo "✓ Cleanup completed"