Skip to content

Commit

Permalink
Merge remote-tracking branch 'opensource/chains/mainnet-beta' into ch…
Browse files Browse the repository at this point in the history
…ains/mainnet-beta

# Conflicts:
#	werf.yaml
  • Loading branch information
olegfomenko committed Oct 4, 2023
2 parents 4272bfe + 94d2b13 commit c182668
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 27 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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
36 changes: 36 additions & 0 deletions .github/workflows/actions_onlymain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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
33 changes: 33 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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
5 changes: 0 additions & 5 deletions werf-giterminism.yaml

This file was deleted.

42 changes: 20 additions & 22 deletions werf.yaml
Original file line number Diff line number Diff line change
@@ -1,49 +1,47 @@
configVersion: 1
project: "backend"
project: "core"
---
image: builder # Название собираемого образа.
from: golang:1.20-alpine # Базовый образ.
image: builder
from: golang:1.20-alpine
docker:
WORKDIR: /go/src/github.com/rarimo/rarimo-core
git: # Секция с директивами для добавления исходных файлов из git-репозитория.
- add: / # Исходный путь в репозитории.
to: /go/src/github.com/rarimo/rarimo-core # Путь назначения в образе.
stageDependencies: # Настройка перевыполнения сборочных инструкций при изменениях определённых файлов в репозитории.
git:
- add: /
to: /go/src/github.com/rarimo/rarimo-core
stageDependencies:
install:
- go.mod
- go.sum
setup: # Для стадии Setup.
setup:
- "**/*"
shell: # Shell сборочные инструкции.
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/
- echo "machine gitlab.com login gitlab-ci-token password {{ env "CI_JOB_TOKEN" }}" > ~/.netrc
- 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/rarimo-core
- go mod tidy
- go mod vendor
- go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest
- cp $GOPATH/bin/cosmovisor /usr/local/bin/cosmovisor
setup: # Для стадии Setup.
- export GOPRIVATE=gitlab.com/*
- export GONOSUMDB=gitlab.com/*
- export GONOPROXY=gitlab.com/*
setup:
- export GOPRIVATE=github.com/*
- export GONOSUMDB=github.com/*
- export GONOPROXY=github.com/*
- export CGO_ENABLED=1
- export GO111MODULE=on
- export GOOS=linux
- cd /go/src/github.com/rarimo/rarimo-core
- go build -o /usr/local/bin/rarimo-core /go/src/github.com/rarimo/rarimo-core/cmd/rarimo-cored

---
image: service # Название собираемого образа.
from: alpine:3.9 # Базовый образ.
image: service
from: alpine:3.9
docker:
ENTRYPOINT: rarimo-core
shell: # Shell сборочные инструкции.
setup: # Для стадии Setup.
shell:
setup:
- apk add --no-cache ca-certificates
import:
- image: builder
Expand Down

0 comments on commit c182668

Please sign in to comment.