Files
installer-tool/.drone.yml
gyurix 6e96e32dbf
Some checks reported errors
continuous-integration/drone/push Build encountered an error
testing4
2024-06-13 14:57:53 +02:00

56 lines
1.2 KiB
YAML

kind: pipeline
name: default
trigger:
branch:
- master
event:
- push
workspace:
path: /drone/src
environment:
IMAGE_NAME: installer-tool
DOCKER_REGISTRY_URL: registry.format.hu
steps:
- name: build demo image
image: plugins/docker
commands:
- cd /drone/src/
- docker build -t $${DOCKER_REGISTRY_URL}/$${IMAGE_NAME} -f Dockerfile .
- docker push $${DOCKER_REGISTRY_URL}/$${IMAGE_NAME}
when:
branch:
- master
volumes:
- name: docker
path: /var/run/docker.sock
- name: update public installer repository
image: alpine:latest
environment:
TOKEN:
from_secret: TOKEN
GIT_URL: https://git.format.hu
REPO: public/local-install
FILE_PATH: install.sh
commands:
- apk --update add curl jq
- URL="$GIT_URL/api/v1/repos/$REPO/contents/$FILE_PATH"
#- echo $URL
- curl -s -v -H "Authorization: token $TOKEN" -H "Accept: application/json" $URL
#- echo $SHA
when:
branch:
- master
volumes:
- name: docker
path: /var/run/docker.sock
volumes:
- name: docker
host:
path: /var/run/docker.sock