diff --git a/.github/actions/gradle/README.md b/.github/actions/gradle/README.md index cb604a81..efbbd5ea 100644 --- a/.github/actions/gradle/README.md +++ b/.github/actions/gradle/README.md @@ -43,6 +43,29 @@ steps: Once the workflow has been triggered and finishes executing, you can navigate to the workflow's output and investigate the summary produced by the build validation scripts. +#### Usage with a private repository + +The first step of each experiment is to clone the repository containing the build to validate. +If your repository requires authentication to clone, such as a private repository, you can use the [`actions/checkout`](https://github.com/marketplace/actions/checkout) action to perform the clone instead, as it supports cloning from repositories requiring authentication. +You can then configure value of the `gitRepo` input parameter to the directory containing the local checkout. + +```yaml +steps: + - name: Checkout + uses: actions/checkout@v4 + with: + path: project-to-validate # Check out the project to a directory named 'project-to-validate' + - name: Download latest version of the validation scripts + uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/download@actions-stable + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Run experiment 3 + uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/experiment-3@actions-stable + with: + gitRepo: "file://$GITHUB_WORKSPACE/project-to-validate" # Use 'project-to-validate' for the experiment + tasks: +``` + ## Configuration cache compatibility Composite actions that will simplify validating Configuration Cache compatibility diff --git a/.github/actions/maven/README.md b/.github/actions/maven/README.md index b598ddbb..4ed62d98 100644 --- a/.github/actions/maven/README.md +++ b/.github/actions/maven/README.md @@ -35,3 +35,25 @@ steps: Once the workflow has been triggered and finishes executing, you can navigate to the workflow's output and investigate the summary produced by the build validation scripts. + +#### Usage with a private repository + +The first step of each experiment is to clone the repository containing the build to validate. +If your repository requires authentication to clone, such as a private repository, you can use the [`actions/checkout`](https://github.com/marketplace/actions/checkout) action to perform the clone instead, as it supports cloning from repositories requiring authentication. +You can then configure value of the `gitRepo` input parameter to the directory containing the local checkout. + +```yaml +steps: + - name: Checkout + uses: actions/checkout@v4 + with: + path: project-to-validate # Check out the project to a directory named 'project-to-validate' + - uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/maven/download@actions-stable + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Run experiment 2 + uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/maven/experiment-2@actions-stable + with: + gitRepo: "file://$GITHUB_WORKSPACE/project-to-validate" # Use 'project-to-validate' for the experiment + goals: +``` \ No newline at end of file