Skip to content

Commit

Permalink
update werf ci
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCherepovskyi committed Aug 14, 2023
1 parent 506d3b6 commit 715b8b4
Showing 1 changed file with 42 additions and 32 deletions.
74 changes: 42 additions & 32 deletions werf.yaml
Original file line number Diff line number Diff line change
@@ -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/[email protected]

- 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
---
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

0 comments on commit 715b8b4

Please sign in to comment.