Skip to content

Commit

Permalink
fix copybara config
Browse files Browse the repository at this point in the history
  • Loading branch information
gesarki committed Nov 26, 2024
1 parent 39144a3 commit 69c81c1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/copybara.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Copybara

on:
workflow_dispatch:
# workflow_dispatch:
pull_request_target:
push:
branches: ["alternative-main"]
Expand All @@ -17,11 +17,17 @@ jobs:
# Checkout as many commits as needed for the diff
fetch-depth: 2

- name: Set up credentials files
# put the ssh_key and access_token in files
run: |
echo ${{ secrets.COPYBARA_SSH_KEY }} > $HOME/copybara_ssh_key
echo "https://user:${{ secrets.COPYBARA_PAT }}@github.com" > $HOME/copyabara_pat
- name: Run Copybara
uses: olivr/copybara[email protected]
with:
ssh_key: ${{ secrets.COPYBARA_SSH_KEY }}
access_token: ${{ secrets.COPYBARA_PAT }}
custom_config: copy.bara.sky
workflow: default
copybara_options: ${{ github.event.number }} --force --init-history
# run copybara and pass in the credentials files
run: |
docker run \
-v "$(pwd)":/usr/src/app \
-v $HOME/copybara_ssh_key:/root/.ssh/id_rsa \
-v $HOME/copybara_pat:/root/.git-credentials \
copybara copy.bara.sky default ${{ github.event.number }} --force --init-history
1 change: 1 addition & 0 deletions copy.bara.sky
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ core.workflow(

destination = git.github_pr_destination(
url = sbv3RepoUrl,
destination_ref = 'main',
),
origin_files = glob([
"javascript/on-demand/**",
Expand Down

0 comments on commit 69c81c1

Please sign in to comment.