Skip to content

Commit 51c758c

Browse files
authored
Merge pull request #10 from hdpriest-ui/add-indexer-container-job
Add indexer container job
2 parents 8a259c8 + 2bd9145 commit 51c758c

File tree

10 files changed

+1061
-135
lines changed

10 files changed

+1061
-135
lines changed

.github/docker/Rstudio/Dockerfile

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

.github/docker/Rstudio/cowsay_conda.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Kernel Indexer Build and Push
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
paths:
7+
- 'kernel-indexer/**'
8+
- 'kernel_indexer'
9+
- '.github/workflows/docker-build-indexer.yml'
10+
pull_request:
11+
branches: [ main, develop ]
12+
paths:
13+
- 'kernel-indexer/**'
14+
- 'kernel_indexer'
15+
- '.github/workflows/docker-build-indexer.yml'
16+
workflow_dispatch:
17+
18+
env:
19+
REGISTRY: docker.io
20+
IMAGE_NAME: ${{ secrets.DOCKERHUB_REPO }}/icrn-kernel-indexer
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
permissions:
26+
contents: read
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v4
31+
32+
- name: Set up Docker Buildx
33+
uses: docker/setup-buildx-action@v3
34+
35+
- name: Log in to Docker Hub
36+
uses: docker/login-action@v3
37+
with:
38+
registry: ${{ env.REGISTRY }}
39+
username: ${{ secrets.DOCKERHUB_USERNAME }}
40+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
41+
42+
- name: Extract metadata
43+
id: meta
44+
uses: docker/metadata-action@v5
45+
with:
46+
images: ${{ env.IMAGE_NAME }}
47+
tags: |
48+
type=ref,event=branch
49+
type=ref,event=pr
50+
type=sha,prefix={{branch}}-
51+
type=raw,value=latest,enable={{is_default_branch}}
52+
53+
- name: Build and push Docker image
54+
id: build
55+
uses: docker/build-push-action@v5
56+
with:
57+
context: .
58+
file: kernel-indexer/Dockerfile
59+
push: true
60+
tags: ${{ steps.meta.outputs.tags }}
61+
labels: ${{ steps.meta.outputs.labels }}
62+
cache-from: type=gha
63+
cache-to: type=gha,mode=max
64+
65+
- name: Output image info
66+
run: |
67+
echo "Built and pushed image: ${{ steps.meta.outputs.tags }}"
68+
echo "Image digest: ${{ steps.build.outputs.digest }}"
69+
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Kernel Webserver Build and Push
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
paths:
7+
- 'web/**'
8+
- '.github/workflows/docker-build-webserver.yml'
9+
pull_request:
10+
branches: [ main, develop ]
11+
paths:
12+
- 'web/**'
13+
- '.github/workflows/docker-build-webserver.yml'
14+
workflow_dispatch:
15+
16+
env:
17+
REGISTRY: docker.io
18+
IMAGE_NAME: ${{ secrets.DOCKERHUB_REPO }}/icrn-kernel-webserver
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
permissions:
24+
contents: read
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Set up Docker Buildx
31+
uses: docker/setup-buildx-action@v3
32+
33+
- name: Log in to Docker Hub
34+
uses: docker/login-action@v3
35+
with:
36+
registry: ${{ env.REGISTRY }}
37+
username: ${{ secrets.DOCKERHUB_USERNAME }}
38+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
39+
40+
- name: Extract metadata
41+
id: meta
42+
uses: docker/metadata-action@v5
43+
with:
44+
images: ${{ env.IMAGE_NAME }}
45+
tags: |
46+
type=ref,event=branch
47+
type=ref,event=pr
48+
type=sha,prefix={{branch}}-
49+
type=raw,value=latest,enable={{is_default_branch}}
50+
51+
- name: Build and push Docker image
52+
id: build
53+
uses: docker/build-push-action@v5
54+
with:
55+
context: .
56+
file: web/Dockerfile
57+
push: true
58+
tags: ${{ steps.meta.outputs.tags }}
59+
labels: ${{ steps.meta.outputs.labels }}
60+
cache-from: type=gha
61+
cache-to: type=gha,mode=max
62+
63+
- name: Output image info
64+
run: |
65+
echo "Built and pushed image: ${{ steps.meta.outputs.tags }}"
66+
echo "Image digest: ${{ steps.build.outputs.digest }}"
67+

.github/workflows/test.yml

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

kernel-indexer/.dockerignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Documentation
2+
DESIGN.md
3+
README.md
4+
*.md
5+
6+
# Git files
7+
.git
8+
.gitignore
9+
10+
# Python cache
11+
__pycache__
12+
*.pyc
13+
*.pyo
14+
*.pyd
15+
.Python
16+
17+
# IDE files
18+
.vscode
19+
.idea
20+
*.swp
21+
*.swo
22+
*~
23+
24+
# OS files
25+
.DS_Store
26+
Thumbs.db
27+

0 commit comments

Comments
 (0)