|
| 1 | +<!-- header:start --> |
| 2 | + |
| 3 | +#  GitHub Action: Local workflow actions |
| 4 | + |
| 5 | +<div align="center"> |
| 6 | + <img src="../../.github/logo.svg" width="60px" align="center" alt="Local workflow actions" /> |
| 7 | +</div> |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +<!-- header:end --> |
| 12 | + |
| 13 | +<!-- badges:start --> |
| 14 | + |
| 15 | +[](https://github.com/marketplace?type=actions&query=hoverkraft-tech+local-workflow-actions) |
| 16 | +[](https://github.com/hoverkraft-tech/ci-github-common/releases) |
| 17 | +[](http://choosealicense.com/licenses/mit/) |
| 18 | +[](https://img.shields.io/github/stars/hoverkraft-tech/ci-github-common?style=social) |
| 19 | +[](https://github.com/hoverkraft-tech/ci-github-common/blob/main/CONTRIBUTING.md) |
| 20 | + |
| 21 | +<!-- badges:end --> |
| 22 | + |
| 23 | +<!-- overview:start --> |
| 24 | + |
| 25 | +## Overview |
| 26 | + |
| 27 | +This action checks out the reusable workflow repository that triggered the current run and copies its local actions directory (default `.github/actions`) into the current workspace. It runs both during the main step and in the post step so that actions with cleanup hooks are also available. |
| 28 | + |
| 29 | +Use it when consuming reusable workflows that reference local actions from the same repository—they are not automatically available in the caller repository and must be synced manually. |
| 30 | + |
| 31 | +<!-- overview:end --> |
| 32 | + |
| 33 | +<!-- usage:start --> |
| 34 | + |
| 35 | +## Usage |
| 36 | + |
| 37 | +```yaml |
| 38 | +- name: Sync workflow-local actions |
| 39 | + uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@5e8d0e6d1e76d8577a070db6d0128a91b1c9d5ad # 0.30.2 |
| 40 | + with: |
| 41 | + # Optional path (relative to the workflow repository) that contains the local actions. |
| 42 | + # The same relative path will be created inside the current workspace. |
| 43 | + # |
| 44 | + # Default: `.github/actions` |
| 45 | + actions-path: .github/actions |
| 46 | + |
| 47 | + # Token used to download the workflow repository. |
| 48 | + # Default: ${{ github.token }} |
| 49 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 50 | +``` |
| 51 | +
|
| 52 | +<!-- usage:end --> |
| 53 | +
|
| 54 | +<!-- inputs:start --> |
| 55 | +
|
| 56 | +## Inputs |
| 57 | +
|
| 58 | +| **Input** | **Description** | **Required** | **Default** | |
| 59 | +| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | --------------------- | |
| 60 | +| **`actions-path`** | Relative path (inside the workflow repository) containing the local actions. The same relative path will be created inside the current workspace. | **false** | `.github/actions` | |
| 61 | +| **`github-token`** | Token used to fetch the workflow repository. Defaults to `github.token`, which is sufficient for public repos and needs `contents:read` for private ones. | **false** | `${{ github.token }}` | |
| 62 | + |
| 63 | +<!-- inputs:end --> |
| 64 | + |
| 65 | +<!-- secrets:start --> |
| 66 | +<!-- secrets:end --> |
| 67 | + |
| 68 | +<!-- outputs:start --> |
| 69 | +<!-- outputs:end --> |
| 70 | + |
| 71 | +<!-- examples:start --> |
| 72 | +<!-- examples:end --> |
| 73 | + |
| 74 | +<!-- |
| 75 | +// jscpd:ignore-start |
| 76 | +--> |
| 77 | + |
| 78 | +<!-- contributing:start --> |
| 79 | + |
| 80 | +## Contributing |
| 81 | + |
| 82 | +Contributions are welcome! Please see the [contributing guidelines](https://github.com/hoverkraft-tech/ci-github-common/blob/main/CONTRIBUTING.md) for more details. |
| 83 | + |
| 84 | +<!-- contributing:end --> |
| 85 | + |
| 86 | +<!-- security:start --> |
| 87 | +<!-- security:end --> |
| 88 | + |
| 89 | +<!-- license:start --> |
| 90 | + |
| 91 | +## License |
| 92 | + |
| 93 | +This project is licensed under the MIT License. |
| 94 | + |
| 95 | +SPDX-License-Identifier: MIT |
| 96 | + |
| 97 | +Copyright © 2025 hoverkraft |
| 98 | + |
| 99 | +For more details, see the [license](http://choosealicense.com/licenses/mit/). |
| 100 | + |
| 101 | +<!-- license:end --> |
| 102 | + |
| 103 | +<!-- generated:start --> |
| 104 | + |
| 105 | +--- |
| 106 | + |
| 107 | +This documentation was automatically generated by [CI Dokumentor](https://github.com/hoverkraft-tech/ci-dokumentor). |
| 108 | + |
| 109 | +<!-- generated:end --> |
| 110 | + |
| 111 | +<!-- |
| 112 | +// jscpd:ignore-end |
| 113 | +--> |
0 commit comments