Update CI config
This commit is contained in:
parent
ba2079449c
commit
3383c24e4f
|
@ -4,20 +4,6 @@ variables:
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- deploy
|
|
||||||
|
|
||||||
bin:
|
|
||||||
stage: build
|
|
||||||
needs: []
|
|
||||||
image: golang:latest
|
|
||||||
script:
|
|
||||||
- mkdir -p $GOPATH/src/$(dirname $REPO_NAME)
|
|
||||||
- ln -svf $CI_PROJECT_DIR $GOPATH/src/$REPO_NAME
|
|
||||||
- cd $GOPATH/src/$REPO_NAME
|
|
||||||
- CGO_ENABLED=0 go build -o $CI_PROJECT_DIR/rimgo
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- rimgo
|
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
image: docker:20
|
image: docker:20
|
||||||
|
@ -34,13 +20,7 @@ docker:
|
||||||
- docker context create mybuilder
|
- docker context create mybuilder
|
||||||
- docker buildx create --use --name mybuilder mybuilder
|
- docker buildx create --use --name mybuilder mybuilder
|
||||||
- docker buildx build --platform linux/amd64,linux/arm64 --push -t $CI_REGISTRY_IMAGE:latest .
|
- docker buildx build --platform linux/amd64,linux/arm64 --push -t $CI_REGISTRY_IMAGE:latest .
|
||||||
|
- docker run --rm $CI_REGISTRY_IMAGE:latest cat /app/stream-proxy > stream-proxy
|
||||||
deploy:
|
artifacts:
|
||||||
image: alpine:latest
|
paths:
|
||||||
stage: deploy
|
- rimgo
|
||||||
needs: []
|
|
||||||
before_script:
|
|
||||||
- apk update && apk --no-cache add curl
|
|
||||||
- wget -O - https://fly.io/install.sh | sh
|
|
||||||
script:
|
|
||||||
- /root/.fly/bin/flyctl deploy --detach
|
|
||||||
|
|
Loading…
Reference in New Issue