-
-
Notifications
You must be signed in to change notification settings - Fork 17
Test workflows with remote Repositories locally
You usually reference actions and reusable workflows with the remote uses syntax <owner>/<repository>/<path>@<ref>
, therefore you may want to test how local changes affects another repository you work on. You need at least runner.server version 3.10.0 or newer to take advantage of this feature.
If you store the files of org/name@ref in /path/to/repository you can tests changes to this remote action without commiting it to GitHub.
Runner.Client --local-repository org/name@ref=/path/to/repository
with Workflow
on: push
jobs:
_:
uses: org/name/.github/workflows/reusable.yml@ref
with:
ref: ${{ github.ref }}
The workflow is read from local path /path/to/repository/.github/workflows/reusable.yml
instead of using the GitHub rest api.
If you store the files of org/name@ref in /path/to/repository you can tests changes to this remote action without commiting it to GitHub.
Runner.Client --local-repository org/name@ref=/path/to/repository
with Workflow
on: push
jobs:
_:
runs-on: self-hosted
steps:
- uses: org/name@ref
with:
ref: ${{ github.ref }}
The action is read from a zip or tar archive created from the local path /path/to/repository
instead of downloading a zip or tar from GitHub.
If you store the files of org/name@ref in /path/to/repository you can tests changes to this remote checkout without commiting it to GitHub.
Runner.Client --local-repository org/name@ref=/path/to/repository
with Workflow
on: push
jobs:
_:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
with:
repository: org/name
ref: ref
The content is copied from /path/to/repository instead of using git or the GitHub rest api for downloading the remote repository.