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

View File

@ -16,13 +16,26 @@ spec:
app: gitea-runner
spec:
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
image: gitea/act_runner:latest
command:
- sh
- -c
- |
apk add --no-cache nodejs npm buildah podman || true
apk add --no-cache nodejs npm || true
cd /data
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
@ -42,11 +55,15 @@ spec:
fieldPath: metadata.name
- name: GITEA_RUNNER_LABELS
value: "ubuntu-latest:host,ubuntu-22.04:host,ubuntu-20.04:host"
- name: DOCKER_HOST
value: "tcp://localhost:2375"
- name: ACT_RUNNER_CONFIG
value: "/data/.runner_config.yaml"
volumeMounts:
- name: runner-data
mountPath: /data
- name: docker-graph-storage
mountPath: /var/lib/docker
- name: runner-config
mountPath: /data/.runner_config.yaml
subPath: config.yaml
@ -60,7 +77,12 @@ spec:
volumes:
- name: runner-data
emptyDir: {}
- name: docker-graph-storage
emptyDir: {}
- name: runner-config
configMap:
name: gitea-runner-config
- name: docker-config
configMap:
name: docker-config
dnsPolicy: ClusterFirst