-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (47 loc) · 1.86 KB
/
copybara-pr.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
46
47
48
49
50
51
name: Copybara PR
on:
pull_request:
types: [labeled, unlabeled]
jobs:
copybara:
#if: contains(github.event.pull_request.labels.*.name, 'enhancement')
permissions:
pull-requests: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup git
run: |
git config --global user.email "[email protected]"
git config --global user.name "ConnectorIO Bot"
git config --global url."https://${BUILD_USER}:${BUILD_TOKEN}@github.com/".insteadOf "ssh://[email protected]:"
git config --global url."https://${BUILD_USER}:${BUILD_TOKEN}@github.com/".insteadOf "git://[email protected]:"
env:
BUILD_USER: x-access-token
BUILD_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
- name: Cache copybara jar
uses: actions/cache@v3
with:
path: bazel-bin/java/com/google/copybara/copybara_deploy.jar
key: copybara
- name: Call copybara
# removed section
# git config -l --global
# echo $PATH
# command -v git
# export GIT_CURL_VERBOSE=1
# export GIT_SSH_COMMAND=""
# and copybara option --git-destination-url="https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/code-house/maven-git-release-test.git" \
run: |
export GIT_SSH_COMMAND=""
java -jar bazel-bin/java/com/google/copybara/copybara_deploy.jar \
migrate .github/copy.bara.sky 3.1.x \
${{ github.event.pull_request.number }} \
--git-destination-url="https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/code-house/maven-git-release-test.git" \
--last-rev ${{ github.event.pull_request.base.sha }}