File tree Expand file tree Collapse file tree 6 files changed +508
-17
lines changed
Expand file tree Collapse file tree 6 files changed +508
-17
lines changed Original file line number Diff line number Diff line change 1- name : Build Docker Image
1+ name : Build Action
22
33on :
44 workflow_dispatch :
55 push :
66 paths :
77 - action/**
8+ - action.yml
89 branches :
910 - main
11+ - gha
1012
1113jobs :
14+ build :
15+ runs-on : ubuntu-latest
16+ permissions :
17+ contents : write
18+ steps :
19+ - name : Checkout
20+ uses : actions/checkout@v4
21+ - name : Use Node.js
22+ uses : actions/setup-node@v2
23+ with :
24+ node-version : 18.20.4
25+ - name : Install pnpm
26+ uses : pnpm/action-setup@v4
27+ id : pnpm-install
28+ with :
29+ version : 9.12.3
30+ run_install : true
31+ - name : Build Action
32+ run : pnpm -C action build
33+ - uses : EndBug/add-and-commit@v9
34+ with :
35+ add : " -f ./action/build ./action/node_modules"
36+ message : " fix(action): build gha [skip ci]"
1237 docker :
1338 runs-on : ubuntu-latest
1439 steps :
Original file line number Diff line number Diff line change @@ -7,15 +7,9 @@ branding:
77 color : " black"
88
99runs :
10- using : " docker"
11- image : " action/Dockerfile"
12- env :
13- LINGODOTDEV_API_KEY : ${{ inputs.api-key }}
14- LINGODOTDEV_PULL_REQUEST : ${{ inputs.pull-request }}
15- LINGODOTDEV_COMMIT_MESSAGE : ${{ inputs.commit-message }}
16- LINGODOTDEV_PULL_REQUEST_TITLE : ${{ inputs.pull-request-title }}
17- LINGODOTDEV_WORKING_DIRECTORY : ${{ inputs.working-directory }}
18- LINGODOTDEV_PROCESS_OWN_COMMITS : ${{ inputs.process-own-commits }}
10+ using : " node20"
11+ main : " action/build/index.js"
12+
1913inputs :
2014 api-key :
2115 description : " Lingo.dev Platform API Key"
Original file line number Diff line number Diff line change 44 "build" : " tsc"
55 },
66 "dependencies" : {
7+ "@actions/core" : " ^1.11.1" ,
78 "@gitbeaker/rest" : " ^39.34.3" ,
89 "bitbucket" : " ^2.12.0" ,
910 "octokit" : " ^4.0.2" ,
Original file line number Diff line number Diff line change 1+ import core from "@actions/core" ;
12import { Octokit } from "octokit" ;
23import { PlatformKit } from "./_base.js" ;
34import Z from "zod" ;
@@ -6,6 +7,17 @@ import { execSync } from "child_process";
67export class GitHubPlatformKit extends PlatformKit {
78 private _octokit ?: Octokit ;
89
10+ constructor ( ) {
11+ process . env . LINGODOTDEV_API_KEY = core . getInput ( "api-key" ) ;
12+ process . env . LINGODOTDEV_PULL_REQUEST = core . getInput ( "pull-request" ) ;
13+ process . env . LINGODOTDEV_COMMIT_MESSAGE = core . getInput ( "commit-message" ) ;
14+ process . env . LINGODOTDEV_PULL_REQUEST_TITLE = core . getInput ( "pull-request-title" ) ;
15+ process . env . LINGODOTDEV_WORKING_DIRECTORY = core . getInput ( "working-directory" ) ;
16+ process . env . LINGODOTDEV_PROCESS_OWN_COMMITS = core . getInput ( "process-own-commits" ) ;
17+
18+ super ( ) ;
19+ }
20+
921 get octokit ( ) {
1022 if ( ! this . _octokit ) {
1123 this . _octokit = new Octokit ( { auth : this . platformConfig . ghToken } ) ;
You can’t perform that action at this time.
0 commit comments