Add Gitea runner and Build-Push workflow for Docker Hub
This commit is contained in:
parent
9f3a2c0408
commit
f02e818a2b
|
|
@ -0,0 +1,37 @@
|
|||
name: Build and Push Docker Images
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'apps/**'
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: frankchine
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Worker Image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: ./apps/worker
|
||||
push: true
|
||||
tags: frankchine/geocrop-worker:latest, frankchine/geocrop-worker:${{ github.sha }}
|
||||
|
||||
- name: Build and push API Image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: ./apps/api
|
||||
push: true
|
||||
tags: frankchine/geocrop-api:latest, frankchine/geocrop-api:${{ github.sha }}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: gitea-runner
|
||||
namespace: geocrop
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: gitea-runner
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: gitea-runner
|
||||
spec:
|
||||
containers:
|
||||
- name: runner
|
||||
image: gitea/act_runner:latest
|
||||
env:
|
||||
- name: GITEA_INSTANCE_URL
|
||||
value: http://gitea.geocrop.svc.cluster.local:3000
|
||||
- name: GITEA_RUNNER_REGISTRATION_TOKEN
|
||||
value: "3daF7zwBC94Q5YCb1mW1VnfPi4L7pgMxSHhKOBOn"
|
||||
- name: GITEA_RUNNER_NAME
|
||||
value: "k3s-runner"
|
||||
- name: GITEA_RUNNER_LABELS
|
||||
value: "ubuntu-latest:docker://node:16-bullseye,ubuntu-22.04:docker://node:16-bullseye"
|
||||
securityContext:
|
||||
privileged: true # Required for Docker-in-Docker
|
||||
volumeMounts:
|
||||
- name: docker-certs
|
||||
mountPath: /certs
|
||||
- name: runner-data
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: docker-certs
|
||||
emptyDir: {}
|
||||
- name: runner-data
|
||||
emptyDir: {}
|
||||
|
|
@ -6,6 +6,7 @@ resources:
|
|||
- jupyter.yaml
|
||||
- mlflow.yaml
|
||||
- postgres-postgis.yaml
|
||||
- gitea-runner.yaml
|
||||
- 10-redis.yaml
|
||||
- 20-minio.yaml
|
||||
- 25-tiler.yaml
|
||||
|
|
|
|||
Loading…
Reference in New Issue