-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
180 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Repo Sync | ||
|
||
on: | ||
push: | ||
branches: [ main ] # or any branch you want to watch | ||
|
||
jobs: | ||
repo-sync: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Pushes to another repository | ||
run: | | ||
SOURCE_DIRECTORY="$(pwd)" # Source directory path | ||
DESTINATION_USERNAME="mpcvault" # Destination GitHub username | ||
DESTINATION_REPOSITORY="mpcvaultapis" # Destination repository name | ||
TARGET_BRANCH="main" # Target branch in the destination repository | ||
USER_EMAIL="[email protected]" | ||
USER_NAME="lxjhk" | ||
git rm -r --cached . | ||
git reset --hard | ||
# Set user information | ||
git config --global user.email "$USER_EMAIL" | ||
git config --global user.name "$USER_NAME" | ||
git config --unset http.https://github.com/.extraheader | ||
GIT_CMD_REPOSITORY="https://$USER_NAME:${{ secrets.MPCVAULT_EXTERN_SYNC_GITHUB_TOKEN }}@github.com/$DESTINATION_USERNAME/$DESTINATION_REPOSITORY.git" | ||
{ | ||
git clone --single-branch --depth 1 --branch "$TARGET_BRANCH" "$GIT_CMD_REPOSITORY" | ||
} || { | ||
echo "::error::Could not clone the destination repository. Command:" | ||
echo "::error::git clone --single-branch --branch $TARGET_BRANCH $GIT_CMD_REPOSITORY" | ||
exit 1 | ||
} | ||
git remote remove origin | ||
git remote add origin $GIT_CMD_REPOSITORY | ||
git push -f origin main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright 2020 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
package mpcvault.platform.v1; | ||
|
||
option go_package = "go.mpcvault.com/genproto/mpcvaultapis/platform/v1;platform"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "ServiceErrorProto"; | ||
option java_package = "com.mpcvault.platform.v1"; | ||
|
||
|
||
message ServiceError { | ||
enum ErrorCode { | ||
ERROR_CODE_UNSPECIFIED = 0; | ||
ERROR_CODE_ORG_SUBSCRIBED_PLAN_LIMIT_EXCEED = 1; | ||
ERROR_CODE_ORG_SUBSCRIBED_PLAN_EXPIRED = 2; | ||
ERROR_CODE_ORG_SUBSCRIBED_PLAN_NOT_SUPPORT = 3; | ||
} | ||
ErrorCode error_code = 1; | ||
string message = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright 2020 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
package mpcvault.rpc.v1; | ||
|
||
import "google/protobuf/any.proto"; | ||
|
||
option go_package = "go.mpcvault.com/genproto/mpcvaultapis/rpc/v1;rpc"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "StatusProto"; | ||
option java_package = "com.mpcvault.rpc.v1"; | ||
|
||
message Status { | ||
repeated google.protobuf.Any details = 1; | ||
} |