Skip to content

Commit

Permalink
Run action in Docker instead
Browse files Browse the repository at this point in the history
  • Loading branch information
splashdust committed Apr 12, 2023
1 parent 4e22e1a commit 389e21c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:18

WORKDIR /app

COPY . .

RUN npm ci

ENTRYPOINT ["node", "index.mjs"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@v2

- name: Generate pull request summary
uses: splashdust/[email protected].6
uses: splashdust/[email protected].7
with:
token: ${{ secrets.GITHUB_TOKEN }}
openaiApiKey: ${{ secrets.OPENAI_API_KEY }}
Expand Down
17 changes: 6 additions & 11 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,9 @@ inputs:
description: "OpenAI Organization ID"
required: true
runs:
using: "composite"
steps:
- name: Install dependencies
run: npm ci
shell: bash
- name: Run action
run: node index.js
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.token }}
OPENAI_API_KEY: ${{ inputs.openaiApiKey }}
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.token }}
- ${{ inputs.openaiApiKey }}
- ${{ inputs.openaiOrgId }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "api-lab",
"version": "1.0.0-beta.6",
"version": "1.0.0-beta.7",
"description": "Generate summary for pull requests using OpenAI API",
"main": "index.mjs",
"type": "module",
Expand Down

0 comments on commit 389e21c

Please sign in to comment.