Skip to content

Commit ac91a21

Browse files
ribafisherichaagdev
andauthoredOct 1, 2024
Added a README section on using GitHub Actions to run experiments with a private repo (#665)
* Added a section on using GitHub Actions to run experiments with a private repo * Applied suggestions from PR comments * Adjust wording --------- Co-authored-by: Eric Haag <[email protected]>
1 parent 537735d commit ac91a21

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed
 

Diff for: ‎.github/actions/gradle/README.md

+23
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,29 @@ steps:
4343
Once the workflow has been triggered and finishes executing, you can navigate to the workflow's output and investigate
4444
the summary produced by the build validation scripts.
4545

46+
#### Usage with a private repository
47+
48+
The first step of each experiment is to clone the repository containing the build to validate.
49+
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.
50+
You can then configure value of the `gitRepo` input parameter to the directory containing the local checkout.
51+
52+
```yaml
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v4
56+
with:
57+
path: project-to-validate # Check out the project to a directory named 'project-to-validate'
58+
- name: Download latest version of the validation scripts
59+
uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/download@actions-stable
60+
with:
61+
token: ${{ secrets.GITHUB_TOKEN }}
62+
- name: Run experiment 3
63+
uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/gradle/experiment-3@actions-stable
64+
with:
65+
gitRepo: "file://$GITHUB_WORKSPACE/project-to-validate" # Use 'project-to-validate' for the experiment
66+
tasks: <PROJECT_BUILD_TASK>
67+
```
68+
4669
## Configuration cache compatibility
4770
4871
Composite actions that will simplify validating Configuration Cache compatibility

Diff for: ‎.github/actions/maven/README.md

+22
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,25 @@ steps:
3535

3636
Once the workflow has been triggered and finishes executing, you can navigate to the workflow's output and investigate
3737
the summary produced by the build validation scripts.
38+
39+
#### Usage with a private repository
40+
41+
The first step of each experiment is to clone the repository containing the build to validate.
42+
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.
43+
You can then configure value of the `gitRepo` input parameter to the directory containing the local checkout.
44+
45+
```yaml
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@v4
49+
with:
50+
path: project-to-validate # Check out the project to a directory named 'project-to-validate'
51+
- uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/maven/download@actions-stable
52+
with:
53+
token: ${{ secrets.GITHUB_TOKEN }}
54+
- name: Run experiment 2
55+
uses: gradle/gradle-enterprise-build-validation-scripts/.github/actions/maven/experiment-2@actions-stable
56+
with:
57+
gitRepo: "file://$GITHUB_WORKSPACE/project-to-validate" # Use 'project-to-validate' for the experiment
58+
goals: <PROJECT_BUILD_GOAL>
59+
```

0 commit comments

Comments
 (0)