Skip to content

Commit

Permalink
adding ci
Browse files Browse the repository at this point in the history
  • Loading branch information
olegfomenko committed Oct 5, 2023
1 parent 74e5de6 commit e652986
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 11 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build Rarimo Core docker image
on:
workflow_dispatch:

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
37 changes: 37 additions & 0 deletions .github/workflows/actions_onlymain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build Rarimo Core docker image
on:
push:
branches:
- 'main'
- 'master'
- 'chains/mainnet'
- 'chains/mainnet-beta'

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
34 changes: 34 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build Rarimo Core docker image tag
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

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_REF_NAME
- name: Run Build
run: |
. $(werf ci-env github --as-file)
werf export service --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_REF_NAME
4 changes: 0 additions & 4 deletions werf-giterminism.yaml

This file was deleted.

13 changes: 6 additions & 7 deletions werf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,16 @@ git:
shell:
install:
- apk add git build-base
- 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 env -w GONOSUMDB=gitlab.com/*
- go env -w GONOPROXY=gitlab.com/*
- go env -w GOPRIVATE=github.com/*
- go env -w GONOSUMDB=github.com/*
- go env -w GONOPROXY=github.com/*
- cd /go/src/github.com/rarimo/tss-svc
- go mod tidy
- go mod vendor
setup:
- export GOPRIVATE=gitlab.com/*
- export GONOSUMDB=gitlab.com/*
- export GONOPROXY=gitlab.com/*
- go env -w GOPRIVATE=github.com/*
- go env -w GONOSUMDB=github.com/*
- go env -w GONOPROXY=github.com/*
- export CGO_ENABLED=1
- export GO111MODULE=off
- export GOOS=linux
Expand Down

0 comments on commit e652986

Please sign in to comment.