-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
506d3b6
commit 715b8b4
Showing
1 changed file
with
42 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |