update readme
This commit is contained in:
parent
1508f5c558
commit
7c4f866606
3 changed files with 32 additions and 2 deletions
|
|
@ -3,6 +3,7 @@ name: Infrastructure
|
|||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ['v*']
|
||||
paths: ['infra/**']
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
|
@ -46,7 +47,7 @@ jobs:
|
|||
apply:
|
||||
runs-on: docker
|
||||
needs: plan
|
||||
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
||||
if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && github.event_name == 'push'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
|
|
|||
13
Makefile
13
Makefile
|
|
@ -1,4 +1,4 @@
|
|||
.PHONY: build run clean help infra-up infra-down infra-logs run-engine run-web infra-init infra-plan infra-apply
|
||||
.PHONY: build run clean help infra-up infra-down infra-logs run-engine run-web infra-init infra-plan infra-apply release
|
||||
|
||||
# Command Variables
|
||||
DOCKER_COMPOSE=docker compose
|
||||
|
|
@ -44,6 +44,17 @@ clean: infra-down
|
|||
$(MAKE) -C tongo-core clean
|
||||
$(DOCKER_COMPOSE) down -v
|
||||
|
||||
## release: Create and push a new production release tag (usage: make release TAG=v1.0.0)
|
||||
release:
|
||||
@if [ -z "$(TAG)" ]; then \
|
||||
echo "Error: TAG variable is required. Example: make release TAG=v1.0.0"; \
|
||||
exit 1; \
|
||||
fi
|
||||
@echo "Creating production release tag $(TAG)..."
|
||||
git tag -a $(TAG) -m "Production release $(TAG)"
|
||||
@echo "Pushing tag $(TAG) to origin..."
|
||||
git push origin $(TAG)
|
||||
|
||||
## help: Show this help
|
||||
help:
|
||||
@grep -E '^## ' Makefile | sed 's/## //' | column -t -s ':'
|
||||
|
|
|
|||
18
README.md
18
README.md
|
|
@ -51,5 +51,23 @@ Visit the console at `http://localhost:3000`.
|
|||
|
||||
---
|
||||
|
||||
## 🚀 Release Process & CI/CD
|
||||
|
||||
This monorepo uses **Forgejo Actions** and **OpenTofu Workspaces** to manage deployments across isolated environments:
|
||||
|
||||
* **Staging (`staging.holo-grid.bar`)**: Target for active development. Any direct push or merge to the `main` branch automatically provisions staging infrastructure and deploys the staging code stack.
|
||||
* **Production (`holo-grid.bar`)**: Target for stable releases. Pushing a Git version tag (e.g. `v1.0.0`) automatically provisions production infrastructure and deploys the release code stack.
|
||||
|
||||
### Triggering a Production Release
|
||||
|
||||
You can create and push a new release tag directly using the Makefile:
|
||||
|
||||
```bash
|
||||
# Create and push release tag v1.0.0
|
||||
make release TAG=v1.0.0
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📜 Ferengi Code of Conduct
|
||||
> "The riskier the road, the greater the profit." — Rule of Acquisition #62
|
||||
|
|
|
|||
Loading…
Reference in a new issue