Skip to content

Commit 7493c6f

Browse files
committed
Update readme with usage
1 parent 7d3de18 commit 7493c6f

File tree

2 files changed

+36
-9
lines changed

2 files changed

+36
-9
lines changed

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
11
# copybara-action
22

3-
GitHub Action that runs [Copybara](https://github.com/google/copybara)
3+
Runs [Copybara](https://github.com/google/copybara) in GitHub Actions
4+
5+
## Usage
6+
Specify `wilmol/copybara-action@v1` as a `step` in your `workflow.yml` file, for example:
7+
```
8+
steps:
9+
- uses: actions/checkout@v1
10+
11+
- uses: wilmol/copybara-action@v1
12+
with:
13+
git_name: wilmol
14+
git_email: willjoemolloy@gmail.com
15+
ssh_key: ${{ secrets.SSH_KEY }}
16+
ssh_known_hosts: ${{ secrets.KNOWN_HOSTS }}
17+
```
18+
19+
__Note,__ internally the action runs docker (specifically [this image](https://hub.docker.com/r/sharelatex/copybara)) so the step must run on Linux.
20+
21+
## Arguments
22+
| Input | Description | Usage |
23+
| :---: | :---: | :---: |
24+
| `git_name` | git config username, for authoring with Copybara | _required_ |
25+
| `git_email` | git config email, for authoring with Copybara | _required_ |
26+
| `ssh_key` | ssh public key, for authenticating with Copybara | _required_ |
27+
| `ssh_known_hosts` | ssh known hosts file contents, for authenticating with Copybara | _required_ |
28+
| `path` | `copy.bara.sky` file path | optional (defaults to repo root) |
29+
30+
See https://github.com/google/copybara for more details, specifically [Using Docker to build and run Copybara](https://github.com/google/copybara#using-docker-to-build-and-run-copybara).

action.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
name: "Copybara"
2-
description: "GitHub Action that runs Copybara"
3-
author: "Will Molloy <willjoemolloy@gmail.com>"
1+
name: "copybara-action"
2+
description: "Runs Copybara in GitHub Actions"
3+
author: "Will Molloy <willjoemolloy@gmail.com> & Ji Paik <jjeonie@gmail.com>"
44

55
inputs:
66
git_name:
7-
description: "Name to use when authoring commits"
7+
description: "git config username, for authoring with Copybara"
88
required: true
99
git_email:
10-
description: "Email address to use when authoring commits"
10+
description: "git config email, for authoring with Copybara"
1111
required: true
1212
ssh_key:
13-
description: "SSH public key for authenticating with the destination repository"
13+
description: "ssh public key, for authenticating with Copybara"
1414
required: true
1515
ssh_known_hosts:
16-
description: "SSH known hosts file contents with the destination repository's fingerprint"
16+
description: "ssh known hosts file contents, for authenticating with Copybara"
1717
required: true
1818
path:
19-
description: "Path to copy.bara.sky"
19+
description: "copy.bara.sky file path"
2020
required: false
2121
default: "."
2222

0 commit comments

Comments
 (0)