Files
test-app/.gitea/workflows/ci.yaml
stackops 43c267355b
Some checks failed
Build and Deploy / build (push) Failing after 10s
fix CI: docker-in-docker socket, docker:27-git image
2026-04-09 15:10:40 +03:00

31 lines
1.1 KiB
YAML

name: Build and Deploy
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
run: |
git clone --depth 1 --branch ${GITHUB_REF_NAME} \
http://gitea-http.gitea.svc.cluster.local:3000/${GITHUB_REPOSITORY}.git workspace
- name: Build and Push
run: |
cd workspace
docker build -t git.nodeup.ru/stackops/test-app:${GITHUB_SHA::8} .
docker tag git.nodeup.ru/stackops/test-app:${GITHUB_SHA::8} git.nodeup.ru/stackops/test-app:latest
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login git.nodeup.ru -u stackops --password-stdin
docker push git.nodeup.ru/stackops/test-app:${GITHUB_SHA::8}
docker push git.nodeup.ru/stackops/test-app:latest
- name: Deploy via StackOps
run: |
wget -qO- --post-data='{"projectId":"${{ secrets.PROJECT_ID }}"}' \
--header="Authorization: Bearer ${{ secrets.STACKOPS_TOKEN }}" \
--header="Content-Type: application/json" \
http://stackops-api.stackops.svc.cluster.local:8080/stackops.v1.StackOpsService/DeployProject