mirror of
https://github.com/SamyRai/turash.git
synced 2025-12-26 23:01:33 +00:00
Compare commits
2 Commits
5da6835eb6
...
f3e6e9d44a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3e6e9d44a | ||
|
|
7b467ab7c8 |
@ -42,25 +42,22 @@ jobs:
|
||||
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- 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
|
||||
- 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 }}
|
||||
|
||||
backend-lint:
|
||||
runs-on: ubuntu-latest
|
||||
@ -95,25 +92,22 @@ jobs:
|
||||
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/master'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- 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
|
||||
- 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 }}
|
||||
|
||||
e2e-test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@ -16,26 +16,13 @@ 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 || true
|
||||
apk add --no-cache nodejs npm buildah podman || 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
|
||||
@ -55,15 +42,11 @@ 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
|
||||
@ -77,12 +60,7 @@ 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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user