Goal: Host a GitHub Actions Marketplace in your own organization, more info here.
This repo will check all repositories in the organization it sits in and write a actions-data.json to a new branch gh-pages.
- Follow best practices and fork any action you want to use in your organization to a specific organization hosting only actions.
- Keep the forks up to date using the github-fork-updater.
- Fork this repository over to the GitHub Actions Organization you created.
- Enable the
get-action-dataworkflow in the forked repository. - Configure GitHub Pages in your forked repository:
- Go to
Settings→Pages - Under "Build and deployment", set Source to: GitHub Actions (not "Deploy from a branch")
- The workflows will automatically deploy your marketplace site
- Go to
- The marketplace will pull action data from the JSON file generated in the
gh-pagesbranch and display your internal actions with search functionality.
The scheduled runs are planned at weekdays, at 7 AM.
The get-action-data will iterate all repositories in the same organization (or user) and find the ones that have actions in them by looking for an action.yml file in the root of the repository. The information from the action.yml file will be parsed and stored in a branch named gh-pages. On updating the file, GitHub Pages will be triggered to publish a new version of your website, with the latest data.
This repository uses several GitHub Actions workflows for different purposes:
- Purpose: Scans organization repositories to find and catalog available GitHub Actions
- Schedule: Runs weekdays at 7 AM UTC (cron:
7 0 * * 1-5) - Also triggers on: Push to
main, manual workflow dispatch - Output: Creates
actions-data.jsoningh-pagesbranch with metadata about all discovered actions - Permissions: Requires
contents: writeto commit togh-pagesbranch
- Purpose: Syncs website files (HTML, CSS, JS) from
maintogh-pagesbranch - Triggers on: Changes to
index.html,script.js,style.css, or_includes/inmainbranch - Features:
- Implements cache-busting with timestamp-based version parameters
- Adds deployment metadata to HTML
- Ensures
.nojekyllfile is present
- Permissions: Requires
contents: writeto push togh-pagesbranch
- Purpose: Deploys the site to GitHub Pages using the Actions deployment method
- Triggers on: Any push to
gh-pagesbranch, manual dispatch - Process: Builds with Jekyll and deploys to Pages environment
- Permissions: Requires
pages: writeandid-token: writefor deployment
- Purpose: Captures visual screenshots of the marketplace UI for pull request review
- Triggers on: Pull requests that modify
index.html,style.css, orscript.js - Output: Screenshots (desktop, mobile, tablet views) uploaded as workflow artifacts
- Note: Helps reviewers see UI changes before merging
- Purpose: Analyzes which actions are being used across the organization
- Triggers on: Push to
used-actionsbranch, manual dispatch - Output:
summarized-actions.jsonartifact with usage statistics - Requirements: Runs in a custom PowerShell container
- Purpose: Builds and publishes the PowerShell container image used by other workflows
- Triggers on: Push to
main,used-actions, orfix-modulebranches - Output: Container image at
ghcr.io/rajbos/actions-marketplace/powershell:7
- Purpose: Automatically adds new issues to a GitHub project board
- Triggers on: New issue creation
- Requirements: Needs
PROJECT_TOKEN,PROJECT_ACCOUNT, andPROJECT_NUMBERsecrets
This repository uses GitHub Actions to publish to GitHub Pages, not branch-based publishing. The deployment involves two key workflows working together:
Configuration Required:
- Go to
Settings→Pagesin your forked repository - Under "Build and deployment", set Source to: GitHub Actions (not "Deploy from a branch")
- This allows the workflows to deploy directly to GitHub Pages using the Actions deployment mechanism
This workflow manages the static website files (HTML, CSS, JavaScript) by syncing them from main to gh-pages branch:
Purpose: Keep the gh-pages branch updated with the latest website files
- Triggers:
- Automatically when
index.html,script.js,style.css, or_includes/files change inmainbranch - Manually via workflow dispatch
- Automatically when
- What it does:
- Copies static files from
maintogh-pagesbranch - Implements cache-busting by updating version parameters (
?v=timestamp) on CSS/JS references - Adds deployment metadata (branch, commit, timestamp) to the HTML
- Ensures the
.nojekyllfile is present to disable Jekyll processing
- Copies static files from
- Branch Role: The
gh-pagesbranch serves as a staging area for all website content before deployment
This workflow actually publishes the site to GitHub Pages:
Purpose: Deploy the gh-pages branch content to the live GitHub Pages site
- Triggers:
- Automatically when the
sync-to-gh-pages.ymlworkflow completes successfully (usingworkflow_runtrigger) - Manually via workflow dispatch
- Automatically when the
- What it does:
- Checks out the
gh-pagesbranch - Builds the site using Jekyll (though
.nojekyllprevents Jekyll transformation) - Uploads the built site as a Pages artifact
- Deploys to the live GitHub Pages environment
- Checks out the
- Permissions: Requires
pages: writeandid-token: writepermissions for deployment - Note: Uses
workflow_runtrigger instead ofpushto avoid GitHub's limitation where workflows triggered byGITHUB_TOKENdon't trigger other workflows
Main Branch Changes
↓
[sync-to-gh-pages.yml runs]
↓
Files copied to gh-pages branch
↓
[jekyll-gh-pages.yml triggered]
↓
Site deployed to GitHub Pages
↓
Live at https://[owner].github.io/actions-marketplace/
The action data (JSON file) is updated separately:
- Triggers: Push to
main, schedule (weekdays at 7 AM), or manual dispatch - Process:
- Scans all repositories in the organization for
action.ymlfiles - Generates
actions-data.jsonwith action metadata - Uploads the JSON directly to the
gh-pagesbranch - This triggers the
sync-to-gh-pages.ymlworkflow, which then triggersjekyll-gh-pages.ymlto redeploy with updated data
- Scans all repositories in the organization for
.nojekyll: Empty file that disables Jekyll processing, preventing theme interference with custom CSS and eliminating build delays. Must exist inmainbranch to be synced togh-pages._config.yml: Contains minimal Jekyll configuration with theme removed to prevent CSS conflicts.actions-data-url.txt: Points to the JSON data file location.
The sync-to-gh-pages.yml workflow implements automatic cache busting:
- Updates version parameters (
?v=timestamp) on CSS and JS references inindex.html - Forces browsers to reload updated files instead of using cached versions
- The
index.htmlinmainbranch has placeholder versions that get replaced during sync
⚠️ Do not configure Pages to deploy from thegh-pagesbranch directly - this would bypass the Jekyll workflow- ✅ Do set Pages source to "GitHub Actions" in repository settings
- The
gh-pagesbranch is an intermediate storage location, not the direct publishing source - Both workflows must remain enabled for the deployment to function correctly
When you fork this repository, you'll need to verify and then trust the automated workflow, before it will start to run. We use the default GITHUB_TOKEN secret to write the data file back to the forked repository. We post the data file with our default user 'Marketplace Updater' that will show up in your git commit history. If you want to override these values, create these secrets and provide values:
- username
- useremail
Please write an issue first, so we can discuss the direction before putting in to much work.
To run things locally you need to have PowerShell Core installed and to setup these parameters:
$organization="rajbos-actions"
$marketplaceRepo="rajbos-actions/actions-marketplace"
$GITHUB_TOKEN="gh-xyz123"
$username = "Rob Bos" # will be used for commiting the changes
$useremail = "your-email@domain.com" # will be used for commiting the changesThen you can call the updater to check all repositories in your organization:
.\src\updater.ps1 -orgName $organization -PAT $GITHUB_TOKEN -marketplaceRepo $marketplaceRepo -userName $username -userEmail $useremailUse a webhosting application to host the index.html file so you can test and debug it. Configure the actions-data-url.txt file to point to a filled json file with the correct structure (generate it once or use https://raw.githubusercontent.com/rajbos-actions/actions-marketplace/gh-pages/actions-data.json).