Skip to content

Update Ecosystem

Update Ecosystem #6

name: Update Ecosystem
on:
workflow_dispatch:
jobs:
update-ecosystem:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Create new branch
run: |
# Get current date for branch name
branch_name="ecosystem-update-$(date +'%Y-%m-%d-%H-%M')"
git checkout -b $branch_name
echo "BRANCH_NAME=$branch_name" >> $GITHUB_ENV
echo "Created branch: $branch_name"
- name: Update ecosystem
env:
ATTIO_API_TOKEN: ${{ secrets.ATTIO_API_TOKEN }}
run: node scripts/attio/updateEcosystem.js
- name: Debug git status
run: |
echo "Current git status:"
git status
echo "Changes in data.json:"
git diff --unified=20 data.json || true
echo "Changes in logos/:"
git diff logos/ || true
- name: Commit changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add data.json logos/
git status
git commit -m "chore: update ecosystem data" || echo "No changes to commit"
- name: Push changes
run: |
echo "Pushing to branch: ${{ env.BRANCH_NAME }}"
git push origin ${{ env.BRANCH_NAME }} --force
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "chore: update ecosystem data"
body: |
🤖 This PR was automatically generated to update the ecosystem database.
## Changes
- Updated `data.json` with latest ecosystem data
- Updated company logos in `logos/` directory
Please review the changes and merge if everything looks correct.
branch: ${{ env.BRANCH_NAME }}
base: main
labels: |
automated
ecosystem-update
delete-branch: false
commit-message: "chore: update ecosystem data"
committer: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"