Skip to content

A GitHub Action that resolves local composite action paths and automatically creates symlinks to reference them easily.

License

Notifications You must be signed in to change notification settings

wei18/local-composite-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📦 local-composite-action

A GitHub Action to conveniently reference local actions!

✨ Features

  • ✅ Automatically resolves the local composite action path
  • ✅ Creates symlinks to use ./../org/repo/path/to/action references
  • ✅ Compatible with default GitHub Actions behavior

🔧 Usage

name: Your composite action

runs:
  using: 'composite'
  steps:
    - uses: wei18/local-composite-action@v1
      with:
        action_repository: ${{ github.action_repository }}
    
    - name: Run local your composite action
      uses: ./../org/repo/.github/composite-actions/example/just-composite-action

    - name: Run local your second composite action
      uses: ./../org/repo/.github/composite-actions/example/another-composite-action

Important

Adjust the relative path based on the symlink location (typically one level above $GITHUB_WORKSPACE).

This version emphasizes that ./../ is required and clarifies why it needs to be used.


📥 Inputs

Name Description Required Default
action_path The actual path to the composite action ${{ github.action_path }}
action_repository The repository name in the form of org/repo

💡 Why this?

In GitHub Actions, the composite action supports uses: ./local-path, but when dealing with monorepos or complex path references, symlinks may not exist, causing failures. This tool helps automatically create the required symlinks, making the references work seamlessly!


📄 License

MIT © wei18

About

A GitHub Action that resolves local composite action paths and automatically creates symlinks to reference them easily.

Topics

Resources

License

Stars

Watchers

Forks