Skip to content

Commit

Permalink
Init dockerize version of action
Browse files Browse the repository at this point in the history
  • Loading branch information
emcfarlane committed Jun 26, 2024
1 parent bb45580 commit 1bb4615
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
run: |
make checkgenerate
test-setup:
if: false # Docker runner not able to setup buf.
runs-on: ubuntu-latest
needs: build
steps:
Expand Down
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:22

RUN apt update && apt install -y git

COPY dist/index.js /index.js
COPY entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,5 +198,5 @@ outputs:
Version of the Buf CLI used.
runs:
using: "node20"
main: "./dist/index.js"
using: "docker"
image: "Dockerfile"
5 changes: 5 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

git config --global --add safe.directory $GITHUB_WORKSPACE
cd $GITHUB_WORKSPACE
node /index.js

0 comments on commit 1bb4615

Please sign in to comment.