Skip to content

Commit 5e28ce1

Browse files
committed
ci: add .github/workflows/copilot-setup-steps.yml
1 parent b551c66 commit 5e28ce1

File tree

5 files changed

+54
-34
lines changed

5 files changed

+54
-34
lines changed

.github/actions/setup/action.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Setup
2+
3+
description: Setup
4+
5+
runs:
6+
using: composite
7+
steps:
8+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
9+
with:
10+
go-version-file: go.mod
11+
12+
- name: Set commiter identity
13+
run: |
14+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
15+
git config --global user.name "github-actions"
16+
17+
- name: Apply typescript-go patches
18+
run: |
19+
pushd typescript-go
20+
git am --3way --no-gpg-sign ../patches/*.patch
21+
popd

.github/workflows/ci.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,13 @@ jobs:
1515
test:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- name: Checkout repo
19-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
18+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2019
with:
2120
fetch-depth: 0 # required for git am --3way to work properly
2221
submodules: true
2322
persist-credentials: false
2423

25-
- name: Install Go
26-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
27-
with:
28-
go-version-file: go.mod
29-
30-
- name: Set commiter identity
31-
run: |
32-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
33-
git config --global user.name "github-actions"
34-
35-
- name: Apply typescript-go patches
36-
run: |
37-
pushd typescript-go
38-
git am --3way --no-gpg-sign ../patches/*.patch
39-
popd
24+
- uses: ./.github/actions/setup
4025

4126
- run: go test ./internal/...
4227

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Copilot Setup Steps
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
types: [opened, synchronize]
7+
paths:
8+
- .github/workflows/copilot-setup-steps.yml
9+
push:
10+
branches:
11+
- main
12+
paths:
13+
- .github/workflows/copilot-setup-steps.yml
14+
15+
permissions: {}
16+
17+
jobs:
18+
copilot-setup-steps:
19+
name: Setup Development Environment for Copilot
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
23+
with:
24+
fetch-depth: 0 # required for git am --3way to work properly
25+
submodules: true
26+
persist-credentials: false
27+
28+
- uses: ./.github/actions/setup

.github/workflows/release.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,13 @@ jobs:
1818
goos: [windows, linux, darwin]
1919
goarch: [amd64, arm64]
2020
steps:
21-
- name: Checkout repo
22-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
21+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2322
with:
2423
fetch-depth: 0 # required for git am --3way to work properly
2524
submodules: true
2625
persist-credentials: false
2726

28-
- name: Install Go
29-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
30-
with:
31-
go-version-file: go.mod
32-
33-
- name: Set commiter identity
34-
run: |
35-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
36-
git config --global user.name "github-actions"
37-
38-
- name: Apply typescript-go patches
39-
run: |
40-
pushd typescript-go
41-
git am --3way --no-gpg-sign ../patches/*.patch
42-
popd
27+
- uses: ./.github/actions/setup
4328

4429
- name: Build binaries
4530
env:

.github/workflows/update-typescript-go.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
# Using secrets.GITHUB_TOKEN isn't allowed to trigger downstream
2222
# workflow runs, so we're using a Personal Access Token (PAT) instead
2323
token: ${{ secrets.OXC_BOT_PAT }}
24+
2425
- name: Install Go
2526
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
2627
with:

0 commit comments

Comments
 (0)