-
Notifications
You must be signed in to change notification settings - Fork 25
53 lines (52 loc) · 1.92 KB
/
opensource.yaml
File metadata and controls
53 lines (52 loc) · 1.92 KB
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
52
53
name: Open source oxy
on:
push:
branches:
- main
- "[0-9]+.[0-9]+.x"
pull_request_target:
branches:
- main
- "[0-9]+.[0-9]+.x"
permissions:
contents: write
actions: read
pull-requests: read
jobs:
move-code:
runs-on: "ubuntu-latest"
if: ${{ ((github.event_name == 'push' && github.repository == 'oxy-hq/oxy-internal') || (github.event_name == 'pull_request_target' && github.repository == 'oxy-hq/oxy' && github.actor != 'dependabot[bot]' )) }}
steps:
- uses: actions/create-github-app-token@v3
name: Create GitHub App Token
id: app-token
with:
client-id: ${{ vars.ARGO_APP_CLIENT_ID }}
private-key: ${{ secrets.ARGO_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: |
oxy-internal
oxy
- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ inputs.branch || github.ref_name }}
token: ${{ steps.app-token.outputs.token }}
- uses: luong-komorebi/copybara-action@ft/sync-pull-request-title
with:
ssh_key: ${{ secrets.OXY_SSH_KEY }}
access_token: ${{ steps.app-token.outputs.token }}
sot_branch: ${{ github.ref_name }}
destination_branch: ${{ github.ref_name }}
sot_repo: oxy-hq/oxy-internal
destination_repo: oxy-hq/oxy
push_exclude: >-
internal-docs/**
# pr_move: |-
# crates/core/dist||oss/dist||**
committer: "${{ steps.app-token.outputs.app-slug }}[bot] <${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>"