Skip to content

Commit b9230ee

Browse files
authored
Merge branch 'main' into test-workflow
2 parents b0e73e9 + 94ddd85 commit b9230ee

File tree

66 files changed

+10139
-4548
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+10139
-4548
lines changed

.eslintrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,15 @@
1212
"react": {
1313
"version": "detect"
1414
}
15+
},
16+
"rules": {
17+
"@typescript-eslint/no-unused-vars": [
18+
"error",
19+
{
20+
"argsIgnorePattern": "^_",
21+
"varsIgnorePattern": "^_",
22+
"ignoreRestSiblings": true
23+
}
24+
]
1525
}
1626
}

.github/workflows/api-server.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: api-server
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release-1.0
8+
pull_request:
9+
branches:
10+
- main
11+
- release-1.0
12+
13+
jobs:
14+
fmt-build-test:
15+
runs-on: ubuntu-latest
16+
17+
env:
18+
CGO_ENABLED: 1
19+
20+
defaults:
21+
run:
22+
working-directory: api-server
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
28+
- name: Set up Go
29+
uses: actions/setup-go@v4
30+
with:
31+
go-version: '1.21.6'
32+
33+
- name: Install Build Dependencies
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get install -y build-essential pkg-config
37+
38+
- name: Install Go Dependencies
39+
run: |
40+
go mod download
41+
42+
- name: Go Format
43+
run: |
44+
unformatted=$(gofmt -l .)
45+
if [ -n "$unformatted" ]; then
46+
echo "The following files are not formatted properly:"
47+
echo "$unformatted"
48+
exit 1
49+
fi
50+
51+
- name: Build
52+
run: |
53+
go build ./...

.github/workflows/cherry-pick.yml

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,36 @@
1-
name: Cherry pick PR into release-1.0 branch
1+
name: Cherry-Pick into release-1.0 branch
22

33
on:
4-
pull_request_target:
4+
pull_request:
5+
types: [closed]
56
branches:
67
- main
78

89
jobs:
9-
cherry_pick_release_1_0:
10+
cherry_pick:
11+
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'cherry-pick-release-1.0')
1012
runs-on: ubuntu-latest
11-
name: Cherry pick into release-1.0 branch
12-
if: ${{ contains(github.event.pull_request.labels.*.name, 'cherry-pick-release-1.0') && github.event.pull_request.merged == true }}
1313
steps:
14-
- name: Checkout
14+
- name: Checkout repository
1515
uses: actions/checkout@v4
1616
with:
1717
fetch-depth: 0
18-
- name: Cherry pick into release-1.0 branch
19-
uses: carloscastrojumo/[email protected]
18+
19+
- name: Set up Git
20+
run: |
21+
git config user.name "GitHub Actions Bot"
22+
git config user.email "[email protected]"
23+
24+
- name: Cherry-pick commit
25+
run: |
26+
git checkout release-1.0
27+
git cherry-pick ${{ github.event.pull_request.merge_commit_sha }}
28+
29+
- name: Create Pull Request
30+
uses: peter-evans/create-pull-request@v5
2031
with:
21-
branch: release-1.0
22-
labels: |
23-
cherry-pick
24-
reviewers: |
25-
instructlab/ui-maintainers
26-
title: '[cherry-pick] {old_title}'
27-
body: 'Cherry picking #{old_pull_request_id} onto this branch'
28-
env:
29-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
token: ${{ secrets.GITHUB_TOKEN }}
33+
branch: cherry-pick-${{ github.event.pull_request.number }}
34+
base: release-1.0
35+
title: 'Cherry-pick: Add commit to release-1.0 ${{ github.event.pull_request.title }}'
36+
body: 'Automatically cherry-picked commit from main branch'

Makefiles/containers-base/Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,18 @@ endif
2828
################## BUILD SOURCE CONTAINERS ##################
2929

3030
ui-image: validate-container-engine src/Containerfile ## Build container image for the InstructLab UI
31-
$(ECHO_PREFIX) printf " %-12s src/Containerfile\n" "[$(CONTAINER_ENGINE), linux/$(TARGET_IMAGE_ARCH)]"
32-
$(CMD_PREFIX) $(CONTAINER_ENGINE) build --platform linux/$(TARGET_IMAGE_ARCH) -f src/Containerfile -t quay.io/instructlab-ui/ui:$(TAG) .
31+
$(ECHO_PREFIX) printf " %-12s src/Containerfile\n" "[$(CONTAINER_ENGINE)]"
32+
$(CMD_PREFIX) $(CONTAINER_ENGINE) build -f src/Containerfile -t quay.io/instructlab-ui/ui:$(TAG) .
3333
$(CMD_PREFIX) $(CONTAINER_ENGINE) tag quay.io/instructlab-ui/ui:$(TAG) quay.io/instructlab-ui/ui:main
34+
$(CMD_PREFIX) $(CONTAINER_ENGINE) tag quay.io/instructlab-ui/ui:$(TAG) ghcr.io/instructlab/ui/ui:main
3435

3536
ps-image: validate-container-engine pathservice/Containerfile ## Build container image for the InstructLab PathService
36-
$(ECHO_PREFIX) printf " %-12s pathservice/Containerfile\n" "[$(CONTAINER_ENGINE), linux/$(TARGET_IMAGE_ARCH)]"
37-
$(CMD_PREFIX) $(CONTAINER_ENGINE) build --platform linux/$(TARGET_IMAGE_ARCH) -f pathservice/Containerfile -t quay.io/instructlab-ui/pathservice:$(TAG) .
37+
$(ECHO_PREFIX) printf " %-12s pathservice/Containerfile\n" "[$(CONTAINER_ENGINE)]"
38+
$(CMD_PREFIX) $(CONTAINER_ENGINE) build -f pathservice/Containerfile -t quay.io/instructlab-ui/pathservice:$(TAG) .
3839
$(CMD_PREFIX) $(CONTAINER_ENGINE) tag quay.io/instructlab-ui/pathservice:$(TAG) quay.io/instructlab-ui/pathservice:main
40+
$(CMD_PREFIX) $(CONTAINER_ENGINE) tag quay.io/instructlab-ui/pathservice:$(TAG) ghcr.io/instructlab/ui/pathservice:main
3941

4042
healthcheck-sidecar-image: validate-container-engine healthcheck-sidecar/Containerfile ## Build container image for the InstructLab Healthcheck-Sidecar
41-
$(ECHO_PREFIX) printf " %-12s healthcheck-sidecar/Containerfile\n" "[$(CONTAINER_ENGINE), linux/$(TARGET_IMAGE_ARCH)]"
43+
$(ECHO_PREFIX) printf " %-12s healthcheck-sidecar/Containerfile\n" "[$(CONTAINER_ENGINE)]"
4244
$(CMD_PREFIX) $(CONTAINER_ENGINE) build -f healthcheck-sidecar/Containerfile -t quay.io/instructlab-ui/healthcheck-sidecar:$(TAG) healthcheck-sidecar
4345
$(CMD_PREFIX) $(CONTAINER_ENGINE) tag quay.io/instructlab-ui/healthcheck-sidecar:$(TAG) quay.io/instructlab-ui/healthcheck-sidecar:main

api-server/.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
8+
# Test binary, built with `go test -c`
9+
*.test
10+
11+
# Output of the go coverage tool, specifically when used with LiteIDE
12+
*.out
13+
14+
# Dependency directories (remove the comment below to include it)
15+
# vendor/
16+
17+
# Go workspace file
18+
go.work
19+
go.work.sum
20+
21+
# env file
22+
.env
23+
24+
# app specific
25+
logs/
26+
jobs.json

0 commit comments

Comments
 (0)