diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 8afc861..b34a280 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -7,30 +7,24 @@ on: jobs: build: runs-on: ubuntu-latest - container: - image: docker:27 steps: - name: Checkout run: | - apk add --no-cache git curl git clone --depth 1 --branch ${GITHUB_REF_NAME} \ - http://gitea-http.gitea.svc.cluster.local:3000/${GITHUB_REPOSITORY}.git . + http://gitea-http.gitea.svc.cluster.local:3000/${GITHUB_REPOSITORY}.git workspace - - name: Build image - run: | - IMAGE=git.nodeup.ru/stackops/test-app:${GITHUB_SHA::8} - docker build -t $IMAGE . - docker tag $IMAGE git.nodeup.ru/stackops/test-app:latest - - - name: Push to registry + - 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: | - curl -sf -X POST http://stackops-api.stackops.svc.cluster.local:8080/stackops.v1.StackOpsService/DeployProject \ - -H "Authorization: Bearer ${{ secrets.STACKOPS_TOKEN }}" \ - -H "Content-Type: application/json" \ - -d '{"projectId":"${{ secrets.PROJECT_ID }}"}' + 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