Skip to content

Commit e8cc18f

Browse files
authored
Merge pull request #299 from drivecore/upgrade-ci-actions
Upgrade ci actions
2 parents 9defbad + edeefde commit e8cc18f

File tree

6 files changed

+42
-127
lines changed

6 files changed

+42
-127
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,21 @@ permissions:
1212
contents: read
1313

1414
env:
15-
PNPM_VERSION: 10.2.1
15+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
1616

1717
jobs:
1818
ci:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v3
22-
23-
- uses: pnpm/action-setup@v2
21+
- uses: actions/checkout@v4
22+
- uses: pnpm/action-setup@v4
2423
with:
25-
version: ${{ env.PNPM_VERSION }}
26-
24+
version: ${{ vars.PNPM_VERSION }}
2725
- uses: actions/setup-node@v4
2826
with:
2927
node-version-file: .nvmrc
30-
31-
- name: Install dependencies
32-
run: pnpm install --frozen-lockfile
33-
34-
- name: Build
35-
run: pnpm build
36-
37-
- name: Install browsers
38-
run: cd packages/agent && pnpm exec playwright install --with-deps chromium
39-
40-
- name: Test
41-
env:
42-
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
43-
run: pnpm test
44-
45-
- name: Lint
46-
run: pnpm lint
28+
- run: pnpm install --frozen-lockfile
29+
- run: pnpm build
30+
- run: cd packages/agent && pnpm exec playwright install --with-deps chromium
31+
- run: pnpm test
32+
- run: pnpm lint

.github/workflows/deploy-docs.yml

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22,39 +22,19 @@ jobs:
2222
id-token: write
2323

2424
steps:
25-
- name: Checkout code
26-
uses: actions/checkout@v4
27-
28-
- name: Google Auth
29-
id: auth
30-
uses: google-github-actions/auth@v2
25+
- uses: actions/checkout@v4
26+
- uses: google-github-actions/auth@v2
3127
with:
3228
credentials_json: ${{ secrets.GCP_SA_KEY }}
33-
34-
- name: Set up Cloud SDK
35-
uses: google-github-actions/setup-gcloud@v2
36-
37-
- name: Configure Docker for GCP
38-
run: |
39-
gcloud auth configure-docker $GAR_HOSTNAME --quiet
40-
41-
- name: Set image path
42-
run: echo "IMAGE_PATH=$GAR_HOSTNAME/$PROJECT_ID/shared-docker-registry/$SERVICE_NAME:${{ github.sha }}" >> $GITHUB_ENV
43-
44-
- name: Build and push Docker container
45-
run: |
46-
cd packages/docs
47-
docker build -t ${{ env.IMAGE_PATH }} .
29+
- uses: google-github-actions/setup-gcloud@v2
30+
- run: gcloud auth configure-docker $GAR_HOSTNAME --quiet
31+
- run: echo "IMAGE_PATH=$GAR_HOSTNAME/$PROJECT_ID/shared-docker-registry/$SERVICE_NAME:${{ github.sha }}" >> $GITHUB_ENV
32+
- run: |
33+
docker build -t ${{ env.IMAGE_PATH }} -f ./packages/docs/Dockerfile .
4834
docker push ${{ env.IMAGE_PATH }}
49-
50-
- name: Deploy to Cloud Run
51-
id: deploy
52-
uses: google-github-actions/deploy-cloudrun@v2
35+
- uses: google-github-actions/deploy-cloudrun@v2
5336
with:
5437
service: ${{ env.SERVICE_NAME }}
5538
region: ${{ env.REGION }}
5639
image: ${{ env.IMAGE_PATH }}
5740
flags: '--allow-unauthenticated'
58-
59-
- name: Show Output
60-
run: echo ${{ steps.deploy.outputs.url }}

.github/workflows/issue-comment.yml

Lines changed: 10 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ permissions:
2020
packages: read # Added in case you need to access GitHub packages
2121

2222
env:
23-
PNPM_VERSION: 10.2.1
23+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
2424

2525
jobs:
2626
process-comment:
@@ -30,46 +30,20 @@ jobs:
3030
contains(github.event.comment.body, '/mycoder') &&
3131
github.event.comment.user.login == 'bhouston'
3232
steps:
33-
- name: Extract prompt from comment
34-
id: extract-prompt
35-
run: |
36-
echo "comment_url=${{ github.event.comment.html_url }}" >> $GITHUB_OUTPUT
37-
echo "comment_id=${{ github.event.comment.id }}" >> $GITHUB_OUTPUT
38-
39-
- name: Checkout repository
40-
uses: actions/checkout@v3
41-
33+
- uses: actions/checkout@v4
4234
- uses: actions/setup-node@v4
4335
with:
4436
node-version-file: .nvmrc
45-
46-
- uses: pnpm/action-setup@v2
37+
- uses: pnpm/action-setup@v4
4738
with:
48-
version: ${{ env.PNPM_VERSION }}
49-
50-
- name: Install dependencies
51-
run: pnpm install
52-
53-
- name: Install browsers
54-
run: cd packages/agent && pnpm exec playwright install --with-deps chromium
55-
56-
- name: Configure Git
57-
run: |
39+
version: ${{ vars.PNPM_VERSION }}
40+
- run: pnpm install
41+
- run: cd packages/agent && pnpm exec playwright install --with-deps chromium
42+
- run: |
5843
git config --global user.name "Ben Houston (via MyCoder)"
5944
git config --global user.email "neuralsoft@gmail.com"
60-
61-
- run:
62-
pnpm install -g mycoder
63-
64-
# Auth GitHub CLI with the token
65-
- name: Configure GitHub CLI
66-
run: |
45+
- run: pnpm install -g mycoder
46+
- run: |
6747
echo "${{ secrets.GH_PAT }}" | gh auth login --with-token
68-
# Verify auth status
6948
gh auth status
70-
71-
- env:
72-
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
73-
run: |
74-
echo "Running MyCoder for issue #${{ github.event.issue.number }} with prompt: ${{ steps.extract-prompt.outputs.prompt }}"
75-
mycoder --upgradeCheck false --githubMode true --userPrompt false "On issue #${{ github.event.issue.number }} in comment ${{ steps.extract-prompt.outputs.comment_url }} the user invoked the mycoder CLI via /mycoder. Can you try to do what they requested or if it is unclear, respond with a comment to that affect to encourage them to be more clear."
49+
- run: mycoder --upgradeCheck false --githubMode true --userPrompt false "On issue #${{ github.event.issue.number }} in comment ${{ steps.extract-prompt.outputs.comment_url }} the user invoked the mycoder CLI via /mycoder. Can you try to do what they requested or if it is unclear, respond with a comment to that affect to encourage them to be more clear."

.github/workflows/release.yml

Lines changed: 12 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,57 +12,31 @@ permissions:
1212
packages: write
1313

1414
env:
15-
PNPM_VERSION: 10.2.1
16-
NODE_VERSION: 23
1715
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
1816

1917
jobs:
2018
release:
2119
name: Release
2220
runs-on: ubuntu-latest
2321
steps:
24-
- name: Checkout
25-
uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2623
with:
27-
fetch-depth: 0
2824
token: ${{ secrets.GITHUB_TOKEN }}
29-
30-
- name: Setup pnpm
31-
uses: pnpm/action-setup@v2
25+
- uses: pnpm/action-setup@v4
3226
with:
33-
version: ${{ env.PNPM_VERSION }}
34-
35-
- name: Setup Node.js
36-
uses: actions/setup-node@v4
27+
version: ${{ vars.PNPM_VERSION }}
28+
- uses: actions/setup-node@v4
3729
with:
38-
node-version: ${{ env.NODE_VERSION }}
39-
cache: 'pnpm'
40-
41-
- name: Install dependencies
42-
run: pnpm install --frozen-lockfile
43-
44-
- name: Build
45-
run: pnpm build
46-
47-
- name: Install browsers
48-
run: cd packages/agent && pnpm exec playwright install --with-deps chromium
49-
50-
- name: Test
51-
run: pnpm test
52-
53-
- name: Debug - Show recent commits
54-
run: git log -n 10 --pretty=format:"%h %s" --date=short
55-
56-
- name: Debug - Run verify-release-config
57-
run: pnpm verify-release-config
58-
59-
- name: Configure Git
60-
run: |
30+
node-version-file: .nvmrc
31+
- run: pnpm install --frozen-lockfile
32+
- run: pnpm build
33+
- run: cd packages/agent && pnpm exec playwright install --with-deps chromium
34+
- run: pnpm test
35+
- run: pnpm verify-release-config
36+
- run: |
6137
git config --global user.email "neuralsoft@gmail.com"
6238
git config --global user.name "Ben Houston (via GitHub Actions)"
63-
64-
- name: Release
65-
env:
39+
- env:
6640
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6741
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6842
run: pnpm release

packages/docs/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ RUN pnpm --filter mycoder-docs build
1111
ENV PORT=8080
1212
EXPOSE ${PORT}
1313

14-
CMD ["pnpm", "--filter", "mycoder-docs", "start"]
14+
CMD ["pnpm", "--filter", "mycoder-docs", "start", "--port", "8080", "--no-open"]
15+

packages/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@mycoder/docs",
2+
"name": "mycoder-docs",
33
"version": "0.10.1",
44
"private": true,
55
"packageManager": "pnpm@10.2.1",

0 commit comments

Comments
 (0)