Skip to content

Commit

Permalink
Merge branch 'main' into fix/using-proper-multibalance-contract
Browse files Browse the repository at this point in the history
  • Loading branch information
napalmpapalam committed Nov 1, 2023
2 parents 59b21da + eb03280 commit bc221bf
Show file tree
Hide file tree
Showing 38 changed files with 1,239 additions and 722 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
33 changes: 33 additions & 0 deletions .github/workflows/actions_onlymain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
push:
branches:
- 'main'

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
189 changes: 0 additions & 189 deletions .gitlab-ci.yml

This file was deleted.

10 changes: 3 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
FROM golang:1.19-alpine as buildbase
FROM golang:1.20-alpine as buildbase

RUN apk add build-base git

ARG CI_JOB_TOKEN

WORKDIR /go/src/gitlab.com/rarimo/dex-pairs-oracle
WORKDIR /go/src/github.com/rarimo/dex-pairs-oracle

COPY . .

ENV GO111MODULE="on"
ENV CGO_ENABLED=1
ENV GOOS="linux"

RUN echo "machine gitlab.com login gitlab-ci-token password $CI_JOB_TOKEN" > ~/.netrc
RUN git config --global url."https://gitlab-ci-token:[email protected]/".insteadOf https://gitlab.com/
RUN go mod tidy
RUN go mod vendor
RUN go build -o /usr/local/bin/dex-pairs-oracle gitlab.com/rarimo/dex-pairs-oracle
RUN go build -o /usr/local/bin/dex-pairs-oracle github.com/rarimo/dex-pairs-oracle

###

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.vendor
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM golang:1.19-alpine as buildbase
FROM golang:1.20-alpine as buildbase

WORKDIR /go/src/gitlab.com/rarimo/dex-pairs-oracle
WORKDIR /go/src/github.com/rarimo/dex-pairs-oracle
COPY vendor .
COPY . .

ENV GO111MODULE="on"
ENV CGO_ENABLED=0
ENV GOOS="linux"

RUN go build -o /usr/local/bin/dex-pairs-oracle gitlab.com/rarimo/dex-pairs-oracle
RUN go build -o /usr/local/bin/dex-pairs-oracle github.com/rarimo/dex-pairs-oracle

###

Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Rarimo Foundation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Backend module that loads DEX asset pairs from several configured sources and ex
## Install

```bash
git clone gitlab.com/rarimo/dex-pairs-oracle
git clone github.com/rarimo/dex-pairs-oracle
cd dex-pairs-oracle
go build main.go
export KV_VIPER_FILE=./config.yaml
Expand Down Expand Up @@ -40,8 +40,8 @@ use `docker run ` with `-p 8080:80` to expose port 80 to 8080
{%_ } _%}

```bash
docker build -t gitlab.com/rarimo/dex-pairs-oracle .
docker run -e KV_VIPER_FILE=/config.yaml gitlab.com/rarimo/dex-pairs-oracle
docker build -t github.com/rarimo/dex-pairs-oracle .
docker run -e KV_VIPER_FILE=/config.yaml github.com/rarimo/dex-pairs-oracle
```

## Running from Source
Expand All @@ -50,11 +50,9 @@ use `docker run ` with `-p 8080:80` to expose port 80 to 8080
* Provide valid config file
* Launch the service with `run service` command





## Contact

Responsible hp
The primary contact for this project is iamhp0
The primary contact for this project is iamhp0

## License
[MIT](./LICENSE)
Loading

0 comments on commit bc221bf

Please sign in to comment.