diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 9ddbd2e..c1f2b1b 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -1,14 +1,29 @@ -# This is a basic workflow to help you get started with Actions +# This is a workflow to manage builds and connect to other repositories name: CI -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch +# Controls when the action will run on: push: branches: [ master ] pull_request: branches: [ master ] + # Allow manual workflow dispatch + workflow_dispatch: + inputs: + target_repo: + description: 'Target repository to notify (optional)' + required: false + type: choice + options: + - 'none' + - 'Web3AI' + - 'gatsby-starter-blog' + - 'Time-Machines-Builders-' + - 'AI-Time-Machines' + # Allow this workflow to be triggered from other repositories + repository_dispatch: + types: [trigger-ci] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -16,11 +31,13 @@ jobs: build: # The type of runner that the job will run on runs-on: ubuntu-latest + permissions: + contents: read # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # Runs a single command using the runners shell - name: Run a one-line script @@ -31,3 +48,36 @@ jobs: run: | echo Add other actions to build, echo test, and deploy your project. + + # Display connected repositories + - name: Show Connected Repositories + run: | + echo "===================================" + echo "Connected Repositories Status" + echo "===================================" + echo "✓ lippytm/Transparency-Logic-Time-Machine-Bots- (this repo)" + echo "✓ lippytm/Web3AI" + echo "✓ lippytm/gatsby-starter-blog" + echo "✓ lippytm/Time-Machines-Builders-" + echo "✓ lippytm/AI-Time-Machines" + echo "===================================" + + # Job to check status of connected repositories + check-connected-repos: + runs-on: ubuntu-latest + permissions: + contents: read + strategy: + matrix: + repo: + - 'Web3AI' + - 'gatsby-starter-blog' + - 'Time-Machines-Builders-' + - 'AI-Time-Machines' + + steps: + - name: Check repository status + run: | + echo "Checking status of lippytm/${{ matrix.repo }}" + echo "Repository: https://github.com/lippytm/${{ matrix.repo }}" + echo "This job monitors connectivity with connected repositories" diff --git a/.github/workflows/cross-repo-sync.yml b/.github/workflows/cross-repo-sync.yml new file mode 100644 index 0000000..0209331 --- /dev/null +++ b/.github/workflows/cross-repo-sync.yml @@ -0,0 +1,77 @@ +# Workflow for synchronizing and notifying connected repositories + +name: Cross-Repository Sync + +on: + push: + branches: [ master ] + workflow_dispatch: + inputs: + notify_all: + description: 'Notify all connected repositories' + required: false + type: boolean + default: false + +jobs: + notify-connected-repos: + runs-on: ubuntu-latest + permissions: + contents: read + if: github.event_name == 'workflow_dispatch' && github.event.inputs.notify_all == 'true' + strategy: + matrix: + repo: + - 'Web3AI' + - 'gatsby-starter-blog' + - 'Time-Machines-Builders-' + - 'AI-Time-Machines' + + steps: + - name: Notify repository + run: | + echo "Would notify repository: lippytm/${{ matrix.repo }}" + echo "Event type: update from Transparency-Logic-Time-Machine-Bots-" + echo "Note: To enable actual notifications, add a PAT token with repo_dispatch permissions" + echo "and uncomment the repository_dispatch action below" + + # Uncomment and configure the following step with a PAT token to enable actual cross-repo triggers + # - name: Repository Dispatch + # uses: peter-evans/repository-dispatch@v2 + # with: + # token: ${{ secrets.REPO_ACCESS_TOKEN }} + # repository: lippytm/${{ matrix.repo }} + # event-type: transparency-bots-update + # client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}' + + display-repo-connections: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Display Connected Repository Network + run: | + echo "╔═══════════════════════════════════════════════════════╗" + echo "║ Transparency Logic Time Machine Bots Network ║" + echo "╚═══════════════════════════════════════════════════════╝" + echo "" + echo "🔗 Connected Repositories:" + echo "" + echo " 1. 🌐 Web3AI" + echo " https://github.com/lippytm/Web3AI" + echo " Purpose: Web3 and AI integration" + echo "" + echo " 2. 📝 gatsby-starter-blog" + echo " https://github.com/lippytm/gatsby-starter-blog" + echo " Purpose: Blog platform with Gatsby" + echo "" + echo " 3. ⚙️ Time-Machines-Builders-" + echo " https://github.com/lippytm/Time-Machines-Builders-" + echo " Purpose: AI automation and blockchain development" + echo "" + echo " 4. 🤖 AI-Time-Machines" + echo " https://github.com/lippytm/AI-Time-Machines" + echo " Purpose: AI Agents integration" + echo "" + echo "═══════════════════════════════════════════════════════" + echo "Workflow completed successfully!" diff --git a/README.md b/README.md index 3bbb070..4c33bdc 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,55 @@ # Transparency-Logic-Time-Machine-Bots- The Grand United Fields of Theories + +## Connected Repositories + +This repository is part of a network of interconnected projects: + +### 🌐 [Web3AI](https://github.com/lippytm/Web3AI) +Web3 and AI integration platform + +### 📝 [gatsby-starter-blog](https://github.com/lippytm/gatsby-starter-blog) +Blog platform built with Gatsby + +### ⚙️ [Time-Machines-Builders-](https://github.com/lippytm/Time-Machines-Builders-) +AI automation in Earn while you Learn to Become a Better Programmer and Blockchain Developer + +### 🤖 [AI-Time-Machines](https://github.com/lippytm/AI-Time-Machines) +Adding AI Agents to everything with Time Machines + +## Workflow Features + +This repository includes GitHub Actions workflows that: + +- ✅ Run continuous integration on push and pull requests +- ✅ Support manual workflow dispatch with repository selection +- ✅ Monitor status of connected repositories +- ✅ Enable cross-repository synchronization +- ✅ Accept repository dispatch events from other repos + +### Workflow Badges + +![CI Status](https://github.com/lippytm/Transparency-Logic-Time-Machine-Bots-/workflows/CI/badge.svg) +![Cross-Repository Sync](https://github.com/lippytm/Transparency-Logic-Time-Machine-Bots-/workflows/Cross-Repository%20Sync/badge.svg) + +## Usage + +### Triggering Workflows Manually + +You can trigger workflows manually from the Actions tab: + +1. Go to the **Actions** tab +2. Select the workflow you want to run +3. Click **Run workflow** +4. Select options as needed + +### Cross-Repository Integration + +To enable full cross-repository dispatch capabilities: + +1. Create a Personal Access Token (PAT) with `repo` scope +2. Add it as a secret named `REPO_ACCESS_TOKEN` in repository settings +3. Uncomment the repository dispatch step in `cross-repo-sync.yml` + +This will allow workflows in this repository to trigger workflows in connected repositories. + diff --git a/REPOSITORY_NETWORK.md b/REPOSITORY_NETWORK.md new file mode 100644 index 0000000..2565813 --- /dev/null +++ b/REPOSITORY_NETWORK.md @@ -0,0 +1,214 @@ +# Repository Network Documentation + +## Overview + +This document describes the network of connected repositories and how they interact through GitHub Actions workflows. + +## Repository Network + +``` +┌─────────────────────────────────────────────────────────────┐ +│ │ +│ Transparency-Logic-Time-Machine-Bots- (Central Hub) │ +│ │ +└────────────────────┬────────────────────────────────────────┘ + │ + ┌────────────┼────────────┬────────────┐ + │ │ │ │ + ▼ ▼ ▼ ▼ + ┌────────┐ ┌─────────┐ ┌─────────┐ ┌──────────┐ + │Web3AI │ │ gatsby- │ │ Time- │ │ AI- │ + │ │ │ starter-│ │ Machines│ │ Time- │ + │ │ │ blog │ │ Builder │ │ Machines │ + └────────┘ └─────────┘ └─────────┘ └──────────┘ +``` + +## Connected Repositories + +### 1. 🌐 Web3AI +- **URL:** https://github.com/lippytm/Web3AI +- **Purpose:** Web3 and AI integration platform +- **Language:** Not specified +- **Stars:** 2 +- **Default Branch:** main + +### 2. 📝 gatsby-starter-blog +- **URL:** https://github.com/lippytm/gatsby-starter-blog +- **Purpose:** Blog platform built with Gatsby +- **Language:** JavaScript +- **Stars:** 1 +- **Default Branch:** master + +### 3. ⚙️ Time-Machines-Builders- +- **URL:** https://github.com/lippytm/Time-Machines-Builders- +- **Purpose:** AI automation - Earn while you Learn to Become a Better Programmer and Blockchain Developer +- **Language:** Not specified +- **Stars:** 1 +- **Default Branch:** main + +### 4. 🤖 AI-Time-Machines +- **URL:** https://github.com/lippytm/AI-Time-Machines +- **Purpose:** Adding AI Agents to everything with Time Machines +- **Language:** JavaScript +- **Stars:** 1 +- **Default Branch:** main + +## Workflow Capabilities + +### CI Workflow (blank.yml) + +**Triggers:** +- Push to master branch +- Pull requests to master branch +- Manual workflow dispatch (with repository selection) +- Repository dispatch events from other repos + +**Jobs:** +1. **build** - Main build job with repository status display +2. **check-connected-repos** - Matrix job that checks all connected repositories + +**Features:** +- Lists all connected repositories on each run +- Can be triggered manually with target repository selection +- Can receive triggers from other repositories via repository_dispatch + +### Cross-Repository Sync Workflow (cross-repo-sync.yml) + +**Triggers:** +- Push to master branch +- Manual workflow dispatch (with notify_all option) + +**Jobs:** +1. **notify-connected-repos** - Notifies all connected repositories (when enabled) +2. **display-repo-connections** - Displays visual network map + +**Features:** +- Visual display of repository network +- Prepared for cross-repository notifications (requires PAT token) +- Matrix-based notification to all connected repos + +## Setup Instructions + +### Basic Usage + +The workflows are ready to use immediately with the following capabilities: +- Automatic CI runs on push/PR +- Manual workflow triggers +- Repository status monitoring +- Visual network display + +### Advanced Setup (Cross-Repository Notifications) + +To enable actual cross-repository dispatch capabilities: + +1. **Create Personal Access Token:** + - Go to GitHub Settings → Developer settings → Personal access tokens + - Generate new token with `repo` scope + - Copy the token + +2. **Add Secret to Repository:** + - Go to repository Settings → Secrets and variables → Actions + - Click "New repository secret" + - Name: `REPO_ACCESS_TOKEN` + - Value: Paste your PAT token + - Click "Add secret" + +3. **Enable Repository Dispatch:** + - Edit `.github/workflows/cross-repo-sync.yml` + - Locate and uncomment the "Repository Dispatch" step + - Commit and push the changes + +4. **Set Up Receiving Repositories:** + Each connected repository should add a workflow to receive events: + ```yaml +name: Handle Remote Trigger + +on: + repository_dispatch: + types: [transparency-bots-update] + +jobs: + handle-update: + runs-on: ubuntu-latest + steps: + - name: Log update + run: | + echo "Triggered by: ${{ github.event.client_payload.ref }}" + echo "From commit: ${{ github.event.client_payload.sha }}" + ``` + +## Manual Workflow Execution + +### Running CI Workflow Manually + +1. Go to: https://github.com/lippytm/Transparency-Logic-Time-Machine-Bots-/actions +2. Click on "CI" workflow +3. Click "Run workflow" button +4. Select a target repository (optional) +5. Click "Run workflow" + +### Running Cross-Repository Sync + +1. Go to: https://github.com/lippytm/Transparency-Logic-Time-Machine-Bots-/actions +2. Click on "Cross-Repository Sync" workflow +3. Click "Run workflow" button +4. Check "Notify all connected repositories" if desired +5. Click "Run workflow" + +## Workflow Badges + +Add these badges to any documentation to show workflow status: + +```markdown +![CI Status](https://github.com/lippytm/Transparency-Logic-Time-Machine-Bots-/workflows/CI/badge.svg) +![Cross-Repository Sync](https://github.com/lippytm/Transparency-Logic-Time-Machine-Bots-/workflows/Cross-Repository%20Sync/badge.svg) +``` + +## Monitoring + +### View Workflow Runs + +- **All workflows:** https://github.com/lippytm/Transparency-Logic-Time-Machine-Bots-/actions +- **CI only:** https://github.com/lippytm/Transparency-Logic-Time-Machine-Bots-/actions/workflows/blank.yml +- **Cross-Repo Sync only:** https://github.com/lippytm/Transparency-Logic-Time-Machine-Bots-/actions/workflows/cross-repo-sync.yml + +### Check Repository Status + +Each workflow run displays the status of all connected repositories in the job output. + +## Future Enhancements + +Potential improvements for the workflow system: + +1. **Automated Dependency Updates:** Track and update dependencies across all repositories +2. **Cross-Repository Testing:** Run tests across repository boundaries +3. **Unified Deployment:** Deploy all repositories together +4. **Health Checks:** Regular automated health checks for all repositories +5. **Metrics Dashboard:** Aggregate metrics from all repositories +6. **Security Scanning:** Unified security scanning across the network + +## Troubleshooting + +### Workflow Not Triggering + +- Check that the workflow file is in the default branch (master) +- Verify YAML syntax is correct +- Check Actions tab for any errors + +### Repository Dispatch Not Working + +- Ensure PAT token has correct scopes +- Verify secret is named exactly `REPO_ACCESS_TOKEN` +- Check that receiving repository has a matching workflow + +### Matrix Jobs Failing + +- Individual repository checks are informational only +- Failures in matrix jobs won't fail the overall workflow + +## Support + +For issues or questions: +- Open an issue in this repository +- Check workflow run logs in the Actions tab +- Review GitHub Actions documentation: https://docs.github.com/en/actions