diff --git a/README.md b/README.md index 403dffd..d813ec3 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,10 @@ Checkout the ref (or latest) upstream version and apply one or more patch files ### Optional -- `upstream_ref`: The upstream ref, can be: branch, tag, sha, if not provided last semver tag will be grabbed automatically -- `upstream_tag_regex`: Regex to use while checking the last upstream versions -- `upstream_remove_files`: Line separated list of files to remove from upstream repository -- `upstream_copy`: Line separated pair of source directory from upstream and destinations +- `upstream_ref`: The upstream ref, can be: branch, tag, sha, if not provided last semver tag will be grabbed automatically. +- `upstream_tag_regex`: Regex to use while checking the last upstream versions. +- `upstream_remove_files`: Line separated list of files to remove from upstream repository. +- `upstream_copy`: Line separated pair of source directory from upstream and destinations. The fields are passed as is to the cp command. ## Outputs @@ -72,3 +72,26 @@ jobs: scripts/cluster-scanner/README.md scripts/cluster-scanner/generate_kubeconfig.sh ``` + +Perform all checks on pull requests and copy some files from the upstream repository to a custom location + +```yaml +name: Checkout and Patch + +on: + pull_request: + types: [opened, edited, synchronize, reopened] + paths: + - 'containers/**' +jobs: + build: + runs-on: self-hosted + steps: + - uses: draios/infra-action-patch-upstream@v1 + with: + upstream_repo: sysdiglabs/charts + local_patch_dir: tests/sysdiglabs/charts + upstream_ref: master + upstream_copy: | + scripts/cluster-scanner/* k8s/ +``` diff --git a/action.yml b/action.yml index 5ccdfaa..8d69669 100644 --- a/action.yml +++ b/action.yml @@ -40,7 +40,7 @@ inputs: required: false upstream_copy: - description: "Line separated pair of source directory from upstream and destinations" + description: "Line separated pair of source directory from upstream and destinations. The fields are passed as is to the cp command" required: false runs: