Skip to content

Commit c281b07

Browse files
committed
feat(action): run on Github without Docker
1 parent ffd6024 commit c281b07

File tree

6 files changed

+478
-43
lines changed

6 files changed

+478
-43
lines changed

.github/workflows/build-action.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build Action
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- action/**
8+
- action.yml
9+
branches:
10+
- main
11+
- gha
12+
13+
jobs:
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+
working-directory: ./action
33+
run: pnpm build
34+
- uses: EndBug/add-and-commit@v9
35+
with:
36+
add: "-f ./action/build"
37+
message: "fix(action): build"
38+
# docker:
39+
# runs-on: ubuntu-latest
40+
# steps:
41+
# - name: Checkout
42+
# uses: actions/checkout@v4
43+
# - name: Login to Docker Hub
44+
# uses: docker/login-action@v3
45+
# with:
46+
# username: ${{ secrets.DOCKERHUB_LINGODOTDEV_USERNAME }}
47+
# password: ${{ secrets.DOCKERHUB_LINGODOTDEV_PASSWORD }}
48+
# - name: Set up QEMU
49+
# uses: docker/setup-qemu-action@v3
50+
# - name: Set up Docker Buildx
51+
# uses: docker/setup-buildx-action@v3
52+
# - name: Build Docker image and push
53+
# uses: docker/build-push-action@v6
54+
# with:
55+
# push: true
56+
# platforms: linux/amd64
57+
# context: ./action
58+
# file: ./action/Dockerfile
59+
# tags: ${{ secrets.DOCKERHUB_LINGODOTDEV_USERNAME }}/ci-action:latest

.github/workflows/docker.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ branding:
77
color: "black"
88

99
runs:
10-
using: "docker"
11-
image: "action/Dockerfile"
10+
using: "node22"
11+
image: "action/build/index.js"
1212
env:
1313
LINGODOTDEV_API_KEY: ${{ inputs.api-key }}
1414
LINGODOTDEV_PULL_REQUEST: ${{ inputs.pull-request }}

action/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"module": "NodeNext",
1212
"target": "ESNext",
1313
"rootDir": "src",
14-
"outDir": "build"
14+
"outDir": "build",
15+
"types": ["node"]
1516
},
1617
"include": ["src/**/*.ts", "src/**/*.tsx"],
1718
"exclude": ["src/**/*.spec.ts", "src/**/*.spec.tsx"]

0 commit comments

Comments
 (0)