This commit is contained in:
Pedro Pérez 2025-05-29 23:39:42 +02:00
parent f6a6be742c
commit 26b6a2a322

View File

@ -1,6 +1,12 @@
when: when:
- event: push event:
branch: main - push
branch:
- main
volumes:
- name: tmp
temp: {}
steps: steps:
- name: build - name: build
@ -11,15 +17,18 @@ steps:
commands: commands:
- mkdir -p /shared/tmp - mkdir -p /shared/tmp
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /shared/tmp/learndrone main.go - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /shared/tmp/learndrone main.go
- name: docker-build - name: docker-build
image: docker image: docker
volumes: volumes:
- name: tmp - name: tmp
path: /shared path: /shared
- /var/run/docker.sock:/var/run/docker.sock
commands: commands:
- docker build -t learndrone:latest /shared/tmp - docker build -t learndrone:latest /shared
- name: deploy - name: deploy
image: docker/compose image: docker/compose:1.29.2
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- /containers/learndrone:/deploy - /containers/learndrone:/deploy