From f31e26030a35cd2f066f20c9eefa2083a0a691a3 Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Wed, 26 Nov 2025 06:17:35 -0800 Subject: [PATCH 1/9] Print cwd --- .github/workflows/upstream.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml index 1b89ead..4521959 100644 --- a/.github/workflows/upstream.yml +++ b/.github/workflows/upstream.yml @@ -19,6 +19,9 @@ jobs: - name: Show directory contents run: ls -la + - name: pwd + run: pwd + - uses: agg23/copybara-action@main with: access_token: ${{ secrets.GITHUB_TOKEN }} From 06a3e543ba2baf04f7701fbeb0d7e63e2d15cd23 Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Wed, 26 Nov 2025 06:25:11 -0800 Subject: [PATCH 2/9] Manually specify migrate --- .github/workflows/upstream.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml index 4521959..9a89563 100644 --- a/.github/workflows/upstream.yml +++ b/.github/workflows/upstream.yml @@ -27,4 +27,4 @@ jobs: access_token: ${{ secrets.GITHUB_TOKEN }} workflow: default custom_config: .github/copy.bara.sky - copybara_options: "/usr/src/app/.github/copy.bara.sky" + copybara_options: "migrate /usr/src/app/.github/copy.bara.sky" From 92c1f2887a8f79904ef32c08fe8f7f5c9c9886e3 Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Wed, 26 Nov 2025 06:39:18 -0800 Subject: [PATCH 3/9] Try directly calling Docker run --- .github/workflows/upstream.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml index 9a89563..ea9a1f2 100644 --- a/.github/workflows/upstream.yml +++ b/.github/workflows/upstream.yml @@ -22,9 +22,19 @@ jobs: - name: pwd run: pwd - - uses: agg23/copybara-action@main - with: - access_token: ${{ secrets.GITHUB_TOKEN }} - workflow: default - custom_config: .github/copy.bara.sky - copybara_options: "migrate /usr/src/app/.github/copy.bara.sky" + - name: "Copybara" + run: | + /usr/bin/docker run \ + -v "$(pwd)":/usr/src/app \ + -v /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts \ + -v /home/runner/.gitconfig:/root/.gitconfig \ + -v /home/runner/.git-credentials:/root/.git-credentials \ + anipos/copybara-docker-image \ + copybara --ignore-noop migrate /usr/src/app/.github/copy.bara.sky + + # - uses: agg23/copybara-action@main + # with: + # access_token: ${{ secrets.GITHUB_TOKEN }} + # workflow: default + # custom_config: .github/copy.bara.sky + # copybara_options: "migrate /usr/src/app/.github/copy.bara.sky" From d6671e0c7ef223b5ae03704af089dc3bdae79cfe Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Wed, 26 Nov 2025 06:41:30 -0800 Subject: [PATCH 4/9] Point to Github Container Registry --- .github/workflows/upstream.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml index ea9a1f2..0cf9a60 100644 --- a/.github/workflows/upstream.yml +++ b/.github/workflows/upstream.yml @@ -29,7 +29,7 @@ jobs: -v /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts \ -v /home/runner/.gitconfig:/root/.gitconfig \ -v /home/runner/.git-credentials:/root/.git-credentials \ - anipos/copybara-docker-image \ + ghcr.io/anipos/copybara-docker-image \ copybara --ignore-noop migrate /usr/src/app/.github/copy.bara.sky # - uses: agg23/copybara-action@main From 88ab2fc768b67ec09d3d20529e06950dbe57b176 Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Wed, 26 Nov 2025 06:42:28 -0800 Subject: [PATCH 5/9] Remove call to copybara binary --- .github/workflows/upstream.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml index 0cf9a60..f632e6b 100644 --- a/.github/workflows/upstream.yml +++ b/.github/workflows/upstream.yml @@ -30,7 +30,7 @@ jobs: -v /home/runner/.gitconfig:/root/.gitconfig \ -v /home/runner/.git-credentials:/root/.git-credentials \ ghcr.io/anipos/copybara-docker-image \ - copybara --ignore-noop migrate /usr/src/app/.github/copy.bara.sky + --ignore-noop migrate /usr/src/app/.github/copy.bara.sky # - uses: agg23/copybara-action@main # with: From 139174df1a750abb9e919173950e834e549c850a Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Wed, 26 Nov 2025 06:46:33 -0800 Subject: [PATCH 6/9] Try without gitconfig --- .github/workflows/upstream.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml index f632e6b..aa582b8 100644 --- a/.github/workflows/upstream.yml +++ b/.github/workflows/upstream.yml @@ -27,7 +27,6 @@ jobs: /usr/bin/docker run \ -v "$(pwd)":/usr/src/app \ -v /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts \ - -v /home/runner/.gitconfig:/root/.gitconfig \ -v /home/runner/.git-credentials:/root/.git-credentials \ ghcr.io/anipos/copybara-docker-image \ --ignore-noop migrate /usr/src/app/.github/copy.bara.sky From dcc0e3d5b159e1eb274fdabf90dbae2d8d0a8a8c Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Wed, 26 Nov 2025 06:48:02 -0800 Subject: [PATCH 7/9] Manually set up Github Actions user identity --- .github/workflows/upstream.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml index aa582b8..59ec38d 100644 --- a/.github/workflows/upstream.yml +++ b/.github/workflows/upstream.yml @@ -22,11 +22,17 @@ jobs: - name: pwd run: pwd + - name: Configure Git + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + - name: "Copybara" run: | /usr/bin/docker run \ -v "$(pwd)":/usr/src/app \ -v /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts \ + -v /home/runner/.gitconfig:/root/.gitconfig \ -v /home/runner/.git-credentials:/root/.git-credentials \ ghcr.io/anipos/copybara-docker-image \ --ignore-noop migrate /usr/src/app/.github/copy.bara.sky From 14058999ae5ecc30988c57cfd1b29c3fff22f442 Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Wed, 26 Nov 2025 06:52:03 -0800 Subject: [PATCH 8/9] Write credentials to file --- .github/workflows/upstream.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml index 59ec38d..052f1ab 100644 --- a/.github/workflows/upstream.yml +++ b/.github/workflows/upstream.yml @@ -26,6 +26,8 @@ jobs: run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" + echo "https://user:${{ secrets.GITHUB_TOKEN }}@github.com" > /home/runner/.git-credentials + git config --global credential.helper store - name: "Copybara" run: | From d012397946e30d342f372348eefc7477d33fc4cc Mon Sep 17 00:00:00 2001 From: Adam Gastineau Date: Wed, 26 Nov 2025 07:36:01 -0800 Subject: [PATCH 9/9] Working Copybara container --- .github/workflows/upstream.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml index 052f1ab..d5cd05f 100644 --- a/.github/workflows/upstream.yml +++ b/.github/workflows/upstream.yml @@ -16,12 +16,6 @@ jobs: with: fetch-depth: 0 - - name: Show directory contents - run: ls -la - - - name: pwd - run: pwd - - name: Configure Git run: | git config --global user.name "github-actions[bot]" @@ -38,10 +32,3 @@ jobs: -v /home/runner/.git-credentials:/root/.git-credentials \ ghcr.io/anipos/copybara-docker-image \ --ignore-noop migrate /usr/src/app/.github/copy.bara.sky - - # - uses: agg23/copybara-action@main - # with: - # access_token: ${{ secrets.GITHUB_TOKEN }} - # workflow: default - # custom_config: .github/copy.bara.sky - # copybara_options: "migrate /usr/src/app/.github/copy.bara.sky"