refactor: migrate CI/CD workflows from GitHub Actions to Gitea Actions and remove legacy workflows
This commit is contained in:
60
.github/workflows/bump-version.yml
vendored
60
.github/workflows/bump-version.yml
vendored
@@ -1,60 +0,0 @@
|
||||
name: Bump Frontend Version
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
bump:
|
||||
description: Version bump type
|
||||
required: true
|
||||
default: patch
|
||||
type: choice
|
||||
options:
|
||||
- patch
|
||||
- minor
|
||||
- major
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
bump-version:
|
||||
name: Bump frontend package version
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Node 20
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
- name: Bump frontend version
|
||||
working-directory: frontend
|
||||
run: npm version ${{ inputs.bump }} --no-git-tag-version
|
||||
|
||||
- name: Commit and push version update
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add frontend/package.json
|
||||
if [ -f frontend/package-lock.json ]; then
|
||||
git add frontend/package-lock.json
|
||||
fi
|
||||
if git diff --cached --quiet; then
|
||||
echo "No version changes to commit"
|
||||
exit 0
|
||||
fi
|
||||
NEW_VERSION=$(node -p "require('./frontend/package.json').version")
|
||||
TAG_NAME="frontend-v${NEW_VERSION}"
|
||||
git commit -m "chore(frontend): bump version to ${NEW_VERSION}"
|
||||
if git rev-parse "${TAG_NAME}" >/dev/null 2>&1; then
|
||||
echo "Tag ${TAG_NAME} already exists"
|
||||
exit 1
|
||||
fi
|
||||
git tag -a "${TAG_NAME}" -m "Frontend ${NEW_VERSION}"
|
||||
git push
|
||||
git push origin "${TAG_NAME}"
|
||||
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -1,10 +1,8 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["**"]
|
||||
pull_request:
|
||||
branches: ["**"]
|
||||
branches: ["develop"]
|
||||
|
||||
jobs:
|
||||
backend-test:
|
||||
|
||||
36
.github/workflows/publish.yml
vendored
36
.github/workflows/publish.yml
vendored
@@ -1,36 +0,0 @@
|
||||
name: Publish to Docker Hub
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
name: Build & Push All-in-one Image
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: production
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.allinone
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/condado-newsletter:latest
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/condado-newsletter:${{ github.sha }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
Reference in New Issue
Block a user