Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/blank.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This is a basic workflow to help you get started with Actions

name: test

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!

# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
34 changes: 34 additions & 0 deletions .github/workflows/copybara.action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Copybara Sync

on:
workflow_dispatch: # manual trigger
push:
branches: ["main"] # auto-trigger on changes

jobs:
run-copybara:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install JDK
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Download Copybara
run: curl -LO https://github.com/google/copybara/releases/latest/download/copybara_deploy.jar

- name: Set Git identity
run: |
git config --global user.name "Copybara Bot"
git config --global user.email "copybara-bot@example.com"

- name: Run Copybara
env:
GITHUB_TOKEN: ${{ secrets.COPYBARA_GITHUB_TOKEN }}
run: |
java -jar copybara_deploy.jar copy.bara.sky github_export --init-history
12 changes: 12 additions & 0 deletions copy.bara.sky
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
core.workflow(
name = "github_export",
origin = git.origin(
url = "https://github.com/coki04/copybara.test",
ref = "main",
),
destination = git.github_pr_destination(
url = "https://$GITHUB_TOKEN@github.com/coki04/copybara.test.dst",
destination_ref = "main",
),
authoring = authoring.pass_thru("COPYBARA <copybara@example.com>"),
)
File renamed without changes.