Compare commits

..

No commits in common. "f3e6e9d44a6fd53f0b09eb1c244e5036494bc480" and "5da6835eb6faf8cab7d6183c2e1a0ebfafbd3bae" have entirely different histories.

2 changed files with 61 additions and 33 deletions

View File

@ -42,22 +42,25 @@ jobs:
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master' if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install buildah and podman - name: Set up Docker Buildx
run: | uses: docker/setup-buildx-action@v3
apt-get update - name: Log in to Harbor
apt-get install -y buildah podman uses: docker/login-action@v3
- name: Log in to Harbor with buildah with:
run: | registry: registry.bk.glpx.pro
buildah login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }} registry.bk.glpx.pro username: ${{ secrets.DOCKER_USERNAME }}
- name: Build and push frontend with buildah password: ${{ secrets.DOCKER_PASSWORD }}
run: | - name: Build and push frontend
buildah build \ uses: docker/build-push-action@v5
--tag registry.bk.glpx.pro/turash/turash-frontend:latest \ with:
--tag registry.bk.glpx.pro/turash/turash-frontend:${{ gitea.sha }} \ context: bugulma/frontend
--file bugulma/frontend/Dockerfile \ file: bugulma/frontend/Dockerfile
bugulma/frontend push: true
buildah push registry.bk.glpx.pro/turash/turash-frontend:latest tags: |
buildah push registry.bk.glpx.pro/turash/turash-frontend:${{ gitea.sha }} registry.bk.glpx.pro/turash/turash-frontend:latest
registry.bk.glpx.pro/turash/turash-frontend:${{ gitea.sha }}
cache-from: type=registry,ref=registry.bk.glpx.pro/turash/turash-frontend:buildcache
cache-to: type=registry,ref=registry.bk.glpx.pro/turash/turash-frontend:buildcache,mode=max
backend-lint: backend-lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -92,22 +95,25 @@ jobs:
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master' if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install buildah and podman - name: Set up Docker Buildx
run: | uses: docker/setup-buildx-action@v3
apt-get update - name: Log in to Harbor
apt-get install -y buildah podman uses: docker/login-action@v3
- name: Log in to Harbor with buildah with:
run: | registry: registry.bk.glpx.pro
buildah login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }} registry.bk.glpx.pro username: ${{ secrets.DOCKER_USERNAME }}
- name: Build and push backend with buildah password: ${{ secrets.DOCKER_PASSWORD }}
run: | - name: Build and push backend
buildah build \ uses: docker/build-push-action@v5
--tag registry.bk.glpx.pro/turash/turash-backend:latest \ with:
--tag registry.bk.glpx.pro/turash/turash-backend:${{ gitea.sha }} \ context: bugulma/backend
--file bugulma/backend/Dockerfile \ file: bugulma/backend/Dockerfile
bugulma/backend push: true
buildah push registry.bk.glpx.pro/turash/turash-backend:latest tags: |
buildah push registry.bk.glpx.pro/turash/turash-backend:${{ gitea.sha }} registry.bk.glpx.pro/turash/turash-backend:latest
registry.bk.glpx.pro/turash/turash-backend:${{ gitea.sha }}
cache-from: type=registry,ref=registry.bk.glpx.pro/turash/turash-backend:buildcache
cache-to: type=registry,ref=registry.bk.glpx.pro/turash/turash-backend:buildcache,mode=max
e2e-test: e2e-test:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -16,13 +16,26 @@ spec:
app: gitea-runner app: gitea-runner
spec: spec:
containers: containers:
- name: docker-daemon
image: docker:dind
env:
- name: DOCKER_TLS_CERTDIR
value: ""
securityContext:
privileged: true
volumeMounts:
- name: docker-graph-storage
mountPath: /var/lib/docker
- name: docker-config
mountPath: /root/.docker/
readOnly: true
- name: runner - name: runner
image: gitea/act_runner:latest image: gitea/act_runner:latest
command: command:
- sh - sh
- -c - -c
- | - |
apk add --no-cache nodejs npm buildah podman || true apk add --no-cache nodejs npm || true
cd /data cd /data
if [ ! -f .runner ]; then if [ ! -f .runner ]; then
/usr/local/bin/act_runner register --instance "$GITEA_INSTANCE_URL" --token "$GITEA_RUNNER_REGISTRATION_TOKEN" --name "$GITEA_RUNNER_NAME" --labels "$GITEA_RUNNER_LABELS" --no-interactive || true /usr/local/bin/act_runner register --instance "$GITEA_INSTANCE_URL" --token "$GITEA_RUNNER_REGISTRATION_TOKEN" --name "$GITEA_RUNNER_NAME" --labels "$GITEA_RUNNER_LABELS" --no-interactive || true
@ -42,11 +55,15 @@ spec:
fieldPath: metadata.name fieldPath: metadata.name
- name: GITEA_RUNNER_LABELS - name: GITEA_RUNNER_LABELS
value: "ubuntu-latest:host,ubuntu-22.04:host,ubuntu-20.04:host" value: "ubuntu-latest:host,ubuntu-22.04:host,ubuntu-20.04:host"
- name: DOCKER_HOST
value: "tcp://localhost:2375"
- name: ACT_RUNNER_CONFIG - name: ACT_RUNNER_CONFIG
value: "/data/.runner_config.yaml" value: "/data/.runner_config.yaml"
volumeMounts: volumeMounts:
- name: runner-data - name: runner-data
mountPath: /data mountPath: /data
- name: docker-graph-storage
mountPath: /var/lib/docker
- name: runner-config - name: runner-config
mountPath: /data/.runner_config.yaml mountPath: /data/.runner_config.yaml
subPath: config.yaml subPath: config.yaml
@ -60,7 +77,12 @@ spec:
volumes: volumes:
- name: runner-data - name: runner-data
emptyDir: {} emptyDir: {}
- name: docker-graph-storage
emptyDir: {}
- name: runner-config - name: runner-config
configMap: configMap:
name: gitea-runner-config name: gitea-runner-config
- name: docker-config
configMap:
name: docker-config
dnsPolicy: ClusterFirst dnsPolicy: ClusterFirst