diff --git a/werf.yaml b/werf.yaml index 7a7988a..ec30116 100644 --- a/werf.yaml +++ b/werf.yaml @@ -1,33 +1,43 @@ -on: - push: - branches: - - '**' +configVersion: 1 +project: "backend" +--- +image: builder +from: golang:1.16.2-stretch +docker: + WORKDIR: /go/src/gitlab.com/tokend/blockparty/marketplace-v2-svc +git: + - add: / + to: / + stageDependencies: + install: + - go.mod + - go.sum + setup: + - "**/*" +shell: + beforeInstall: + - apk add git build-base + install: + - git config --global url."https://gitlab-ci-token:{{ env "CI_JOB_TOKEN" }}@gitlab.com/".insteadOf https://gitlab.com/ + - go env -w GOPRIVATE=gitlab.com/* + - go mod tidy + - go mod vendor + setup: + - export CGO_ENABLED=0 + - export GO111MODULE=off + - export GOOS=linux + - go build -o /usr/local/bin/marketplace-v2-svc /go/src/gitlab.com/tokend/blockparty/marketplace-v2-svc -jobs: - converge: - name: Converge - runs-on: ubuntu-latest - steps: - - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Install werf - uses: werf/actions/install@v1.2 - - - name: Log in to registry - # This is where you will update the personal access token to GITHUB_TOKEN - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin - - - name: Run echo - run: | - werf version - docker version - echo $GITHUB_REPOSITORY - echo $GITHUB_SHA - - name: Run Build - run: | - . $(werf ci-env github --as-file) - werf export service --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_SHA \ No newline at end of file +--- +image: service +from: alpine:3.18 +docker: + ENTRYPOINT: marketplace-v2-svc +shell: + setup: + - apk add --no-cache ca-certificates +import: + - image: builder + add: /usr/local/bin/marketplace-v2-svc + to: /usr/local/bin/marketplace-v2-svc + after: builder