Skip to content

Added a README section on using GitHub Actions to run experiments with a private repo #665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/actions/gradle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <PROJECT_BUILD_TASK>
```

## Configuration cache compatibility

Composite actions that will simplify validating Configuration Cache compatibility
Expand Down
22 changes: 22 additions & 0 deletions .github/actions/maven/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <PROJECT_BUILD_GOAL>
```