Skip to content

Commit

Permalink
chore(doc): add upstream copy documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
massimoschembri committed Jan 4, 2024
1 parent fa1d14d commit 24ab06c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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/
```
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 24ab06c

Please sign in to comment.