Checkout the ref (or latest) upstream version and apply one or more patch files
upstream_repo
: The upstream repo we want to checkout and patchlocal_patch_dir
: Directory of the patch files, must end with .patch
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 repository and destinations. The fields are passed as is to the cp command.
-
latest
: True/False if we used the last tag from upstream or not -
tag
: Upstream tag ref checked out and patched
- The action will always checkout the upstream repo under
upstream
directory.
Patch files from upstream repository
jobs:
build:
steps:
- uses: draios/[email protected]
with:
upstream_repo: sysdiglabs/charts
local_patch_dir: tests/sysdiglabs/charts
upstream_ref: master
Patch files from upstream repository and remove some not needed files
jobs:
build:
steps:
- uses: draios/[email protected]
with:
upstream_repo: sysdiglabs/charts
local_patch_dir: tests/sysdiglabs/charts
upstream_ref: master
upstream_remove_files: |
scripts/cluster-scanner/README.md
scripts/cluster-scanner/generate_kubeconfig.sh
Patch files from upstream repository and copy files to custom locations
jobs:
build:
steps:
- uses: draios/[email protected]
with:
upstream_repo: sysdiglabs/charts
local_patch_dir: tests/sysdiglabs/charts
upstream_ref: master
upstream_copy: |
scripts/cluster-scanner/* k8s/