Skip to content

Commit 6a373fe

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

File tree

6 files changed

+476
-43
lines changed

6 files changed

+476
-43
lines changed

.github/workflows/build-action.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
- name: Use Node.js
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: 18.20.4
23+
- name: Install pnpm
24+
uses: pnpm/action-setup@v4
25+
id: pnpm-install
26+
with:
27+
version: 9.12.3
28+
run_install: true
29+
- name: Build Action
30+
working-directory: ./action
31+
run: pnpm build
32+
- uses: EndBug/add-and-commit@v9
33+
with:
34+
add: "-f ./action/build"
35+
message: "fix(action): build"
36+
# docker:
37+
# runs-on: ubuntu-latest
38+
# steps:
39+
# - name: Checkout
40+
# uses: actions/checkout@v4
41+
# - name: Login to Docker Hub
42+
# uses: docker/login-action@v3
43+
# with:
44+
# username: ${{ secrets.DOCKERHUB_LINGODOTDEV_USERNAME }}
45+
# password: ${{ secrets.DOCKERHUB_LINGODOTDEV_PASSWORD }}
46+
# - name: Set up QEMU
47+
# uses: docker/setup-qemu-action@v3
48+
# - name: Set up Docker Buildx
49+
# uses: docker/setup-buildx-action@v3
50+
# - name: Build Docker image and push
51+
# uses: docker/build-push-action@v6
52+
# with:
53+
# push: true
54+
# platforms: linux/amd64
55+
# context: ./action
56+
# file: ./action/Dockerfile
57+
# 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)