mirror of
https://github.com/hashicorp/vault-action.git
synced 2025-11-07 15:16:56 +00:00
update local test to workflow_dispatch
This commit is contained in:
parent
ab29483bc6
commit
01f27b183a
2 changed files with 22 additions and 11 deletions
14
.github/workflows/local-test.yaml
vendored
14
.github/workflows/local-test.yaml
vendored
|
|
@ -1,16 +1,20 @@
|
|||
# This is a sample workflow to help test contributions
|
||||
# Change the branch name, url and token to fit with your own environment
|
||||
|
||||
# Use 'on: push' instead of 'on: local-test' if you wish to run the test on github
|
||||
# If running locally with act, run the workflow with 'act local-test'
|
||||
# To run this locally with act use:
|
||||
# act workflow_dispatch -j local-test
|
||||
#
|
||||
# If you have permissions, you can run this workflow via the GitHub UI.
|
||||
# Otherwise, use 'on: push' instead of 'on: workflow_dispatch'.
|
||||
|
||||
# Don't forget to revert the file changes and invalidate any tokens that were committed before opening a pull-request
|
||||
on: local-test
|
||||
# Don't forget to revert the file changes and invalidate any tokens that were
|
||||
# committed before opening a pull request.
|
||||
on: workflow_dispatch
|
||||
|
||||
name: local-test
|
||||
|
||||
jobs:
|
||||
build:
|
||||
local-test:
|
||||
name: local-test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
|
|
|||
19
README.md
19
README.md
|
|
@ -546,8 +546,12 @@ $ npm run test:integration:basic # Choose one of: basic, enterprise, e2e, e2e-tl
|
|||
|
||||
### Running the action locally
|
||||
|
||||
You can use the [act](https://github.com/nektos/act) command to test your changes locally if desired. Unfortunately it is not currently possible to use uncommitted local changes for a shared workfow. You will still need to push
|
||||
the changes you would like to validate beforehand. Even if a commit is necessary, this is still a more detailed and faster feedback loop than waiting for the action to be executed by Github in a different repository.
|
||||
You can use the [act](https://github.com/nektos/act) command to test your
|
||||
changes locally if desired. Unfortunately it is not currently possible to use
|
||||
uncommitted local changes for a shared workfow. You will still need to push the
|
||||
changes you would like to validate beforehand. Even if a commit is necessary,
|
||||
this is still a more detailed and faster feedback loop than waiting for the
|
||||
action to be executed by Github in a different repository.
|
||||
|
||||
Push your changes into a feature branch.
|
||||
```sh
|
||||
|
|
@ -556,8 +560,11 @@ $ git commit -m "testing new changes"
|
|||
$ git push
|
||||
```
|
||||
|
||||
Edit the ./.github/workflows/local-test.yaml file to use your new feature branch. You may have to additionally edit the vault url, token and secret path if you are not using one of the provided containerized instance.
|
||||
Run your feature branch locally.
|
||||
Edit the ./.github/workflows/local-test.yaml file to use your new feature
|
||||
branch. You may have to additionally edit the vault url, token and secret path
|
||||
if you are not using one of the provided containerized instance. Run your
|
||||
feature branch locally.
|
||||
|
||||
```sh
|
||||
$ act local-test
|
||||
```
|
||||
$ act workflow_dispatch -j local-test
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in a new issue