Skip to content

feat: publishing ci cd - #3

Merged
Jakub-Vacek merged 5 commits into
mainfrom
feat/publishing-ci-cd
Jun 30, 2026
Merged

Jakub-Vacek merged 5 commits into
mainfrom
feat/publishing-ci-cd

Conversation

@Jakub-Vacek

Copy link
Copy Markdown
Collaborator

This PR adds CI/CD workflow to update the SHA in xai marketplace. This workflow is only for update, not upsert. More context:
This plugin is distributed through the xAI Plugin Marketplace
as a remote url source, pinned to a specific commit SHA of this repository.

The sync-marketplace workflow keeps that pin
up to date: after every push to main, it opens (or updates) a PR against the
marketplace that re-pins the apify entry to the new commit.

One-time setup

The automation can only update an entry that already exists upstream, and it
needs a fork plus a token. Do these once:

1. Fork the marketplace

Fork xai-org/plugin-marketplace
to apify/plugin-marketplace. The workflow pushes its branch here and opens
the cross-fork PR from it.

2. Create the token

Create a fine-grained PAT with access limited to apify/plugin-marketplace
and these repository permissions:

  • Contents: Read and write
  • Pull requests: Read and write

GitHub gates PR creation on write access to the head (fork) repo, so a token
scoped to the fork is sufficient to open the PR against the upstream repo.

Add it to this repo as a secret named MARKETPLACE_PAT
(Settings → Secrets and variables → Actions → New repository secret).

3. Submit the first PR manually

The workflow is update-only, so the initial entry must be added by hand. In your
fork, add this object to the plugins array in .grok-plugin/marketplace.json,
replacing the sha with the current main commit
(git ls-remote https://github.com/apify/apify-grok-build-plugin.git HEAD):

{
  "name": "apify",
  "description": "Apify plugin for Grok Build — Apify MCP server, an `apify` routing subagent, and skills covering Actor development, actorization, SDK integration, and the ultimate scraper.",
  "category": "data-extraction",
  "source": {
    "source": "url",
    "url": "https://github.com/apify/apify-grok-build-plugin.git",
    "sha": "REPLACE_WITH_40_CHAR_COMMIT_SHA"
  },
  "homepage": "https://apify.com",
  "keywords": ["apify", "web-scraping", "actors", "mcp", "automation"],
  "domains": ["apify.com"]
}

Then regenerate the index and validate before opening the PR:

python3 scripts/generate-plugin-index.py
python3 scripts/validate-catalog.py

Note: the repo must be public before the marketplace can fetch it at the
pinned SHA.

After setup

Once that first PR is merged, every push to main automatically opens/updates a
re-pin PR. No further manual steps are needed.

You can also trigger it on demand from the Actions tab
(Sync plugin SHA to xAI marketplaceRun workflow).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an automated CI/CD workflow that keeps this repository’s commit SHA in sync with the xAI Plugin Marketplace entry by opening/updating a PR in the marketplace repo after pushes to main.

Changes:

  • Documented the plugin’s publishing/distribution mechanism via the xAI Plugin Marketplace in README.md.
  • Added a new GitHub Actions workflow to update the marketplace catalog entry’s pinned SHA and open/update a corresponding PR.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
README.md Adds a “Publishing” section describing marketplace distribution and where to find the workflow/setup info.
.github/workflows/sync-marketplace.yml Introduces an automation workflow that updates the marketplace JSON, regenerates/validates the catalog, and opens/updates an upstream PR.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread .github/workflows/sync-marketplace.yml Outdated
Jakub-Vacek and others added 2 commits June 29, 2026 14:18
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Jakub-Vacek
Jakub-Vacek marked this pull request as ready for review June 29, 2026 12:19
@Jakub-Vacek
Jakub-Vacek requested a review from drobnikj June 29, 2026 12:20

@drobnikj drobnikj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two notes, pre-approving. Let me know once you need to create tokens and repos.

Comment thread .github/workflows/sync-marketplace.yml Outdated
Comment thread .github/workflows/sync-marketplace.yml Outdated
…uild-plugin into feat/publishing-ci-cd

# Conflicts:
#	README.md
@Jakub-Vacek

Copy link
Copy Markdown
Collaborator Author

Two notes, pre-approving. Let me know once you need to create tokens and repos.

Thanks! I will need it after this is tested by Apify.

@Jakub-Vacek
Jakub-Vacek merged commit 6603572 into main Jun 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants