forked from will-molloy/copybara-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
45 lines (39 loc) · 1.32 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: "Copybara Action"
description: "Transforms and moves code between repositories."
author: "Will Molloy <[email protected]> & Ji Paik <[email protected]>"
inputs:
git_name:
description: "git config username, for authoring with Copybara"
required: true
git_email:
description: "git config email, for authoring with Copybara"
required: true
ssh_key:
description: "ssh public key, for authenticating with Copybara"
required: true
ssh_known_hosts:
description: "ssh known hosts file contents, for authenticating with Copybara"
required: true
path:
description: "copy.bara.sky file path"
required: false
default: "."
runs:
using: "composite"
steps:
- run: |
mkdir ~/.ssh
echo $'${{ inputs.ssh_key }}' > ~/.ssh/id_rsa
echo $'${{ inputs.ssh_known_hosts }}' > ~/.ssh/known_hosts
shell: bash
- run: |
git config --global user.name ${{ inputs.git_name }}
git config --global user.email ${{ inputs.git_email }}
shell: bash
- run: docker pull sharelatex/copybara:latest
shell: bash
- run: docker run -v ~/.ssh:/root/.ssh -v ~/.gitconfig:/root/.gitconfig -v "$(pwd)":/usr/src/app -e COPYBARA_CONFIG=${{ inputs.path }} -i sharelatex/copybara copybara || true
shell: bash
branding:
icon: 'copy'
color: 'blue'