Skip to content

Commit fe1a0ac

Browse files
committed
build: update ga workflows
1 parent 026d79a commit fe1a0ac

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

Diff for: .github/actions/trigger-stage-deploy.js renamed to .github/actions/trigger-env-deploy.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
const { Octokit } = require('@octokit/action');
2-
3-
const octokit = new Octokit();
4-
51
(async () => {
2+
const { Octokit } = await import('@octokit/action');
3+
const octokit = new Octokit();
4+
65
try {
76
await octokit.request(
87
`POST /repos/cfu288/ansible_inventories/actions/workflows/${process.env.WORKFLOW_ID}/dispatches`,
98
{
109
ref: 'main',
11-
}
10+
},
1211
);
1312
console.log('Stage deploy completed');
1413
} catch (error) {

Diff for: .github/workflows/production.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
with:
7373
node-version: 18
7474
- run: npm install @octokit/action
75-
- run: node .github/actions/trigger-stage-deploy.js
75+
- run: node .github/actions/trigger-env-deploy.js
7676
env:
7777
GITHUB_TOKEN: ${{ secrets.PAT_DEPLOY_GITHUB_TOKEN }}
7878
WORKFLOW_ID: ${{ vars.PROD_WORKFLOW_ID }}

Diff for: .github/workflows/staging.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
with:
4747
node-version: 18
4848
- run: npm install @octokit/action
49-
- run: node .github/actions/trigger-stage-deploy.js
49+
- run: node .github/actions/trigger-env-deploy.js
5050
env:
5151
GITHUB_TOKEN: ${{ secrets.PAT_DEPLOY_GITHUB_TOKEN }}
5252
WORKFLOW_ID: ${{ vars.STAGE_WORKFLOW_ID }}

0 commit comments

Comments
 (0)