Skip to content

Commit 1cc4a16

Browse files
authored
Working Copybara Workflow (#63)
* Print cwd * Manually specify migrate * Try directly calling Docker run * Point to Github Container Registry * Remove call to copybara binary * Try without gitconfig * Manually set up Github Actions user identity * Write credentials to file * Working Copybara container
1 parent ad8c108 commit 1cc4a16

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

.github/workflows/upstream.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,19 @@ jobs:
1616
with:
1717
fetch-depth: 0
1818

19-
- name: Show directory contents
20-
run: ls -la
19+
- name: Configure Git
20+
run: |
21+
git config --global user.name "github-actions[bot]"
22+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
23+
echo "https://user:${{ secrets.GITHUB_TOKEN }}@github.com" > /home/runner/.git-credentials
24+
git config --global credential.helper store
2125
22-
- uses: agg23/copybara-action@main
23-
with:
24-
access_token: ${{ secrets.GITHUB_TOKEN }}
25-
workflow: default
26-
custom_config: .github/copy.bara.sky
27-
copybara_options: "/usr/src/app/.github/copy.bara.sky"
26+
- name: "Copybara"
27+
run: |
28+
/usr/bin/docker run \
29+
-v "$(pwd)":/usr/src/app \
30+
-v /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts \
31+
-v /home/runner/.gitconfig:/root/.gitconfig \
32+
-v /home/runner/.git-credentials:/root/.git-credentials \
33+
ghcr.io/anipos/copybara-docker-image \
34+
--ignore-noop migrate /usr/src/app/.github/copy.bara.sky

0 commit comments

Comments
 (0)