Skip to content

Commit 30da53d

Browse files
committed
chore: test git push
1 parent 9880fa1 commit 30da53d

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ jobs:
3131
platforms: linux/amd64
3232
context: ./action
3333
file: ./action/Dockerfile
34-
tags: ${{ secrets.DOCKERHUB_USERNAME }}/ci:v16
34+
tags: ${{ secrets.DOCKERHUB_USERNAME }}/ci:v18

action/src/flows/_base.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ export interface IIntegrationFlow {
88
}
99

1010
export abstract class IntegrationFlow implements IIntegrationFlow {
11+
protected i18nBranchName?: string;
12+
1113
constructor(
1214
protected ora: Ora,
1315
protected platformKit: PlatformKit,

action/src/flows/in-branch.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ export class InBranchFlow extends IntegrationFlow {
1919
const hasChanges = this.checkCommitableChanges();
2020
this.ora.succeed(hasChanges ? "Changes detected" : "No changes detected");
2121

22-
execSync(`git status`, { stdio: "inherit" });
23-
execSync(`git branch`, { stdio: "inherit" });
24-
2522
if (hasChanges) {
2623
this.ora.start("Committing changes");
2724
execSync(`git add .`, { stdio: "inherit" });
@@ -33,10 +30,11 @@ export class InBranchFlow extends IntegrationFlow {
3330
execSync(`git remote -v`, { stdio: "inherit" });
3431

3532
this.ora.start("Pushing changes to remote");
36-
execSync(
37-
`git push origin ${this.platformKit.platformConfig.baseBranchName} --force`,
38-
{ stdio: "inherit" },
39-
);
33+
const currentBranch =
34+
this.i18nBranchName ?? this.platformKit.platformConfig.baseBranchName;
35+
execSync(`git push origin ${currentBranch} --force`, {
36+
stdio: "inherit",
37+
});
4038
this.ora.succeed("Changes pushed to remote");
4139
}
4240

action/src/flows/pull-request.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { execSync } from "child_process";
22
import { InBranchFlow } from "./in-branch.js";
33

44
export class PullRequestFlow extends InBranchFlow {
5-
private i18nBranchName?: string;
6-
75
async preRun() {
86
const canContinue = await super.preRun?.();
97
if (!canContinue) {

0 commit comments

Comments
 (0)