From f663921ba40f41c027bbf4fa951259a49a255a21 Mon Sep 17 00:00:00 2001 From: Maksym Hrynenko Date: Thu, 23 May 2024 20:36:47 +0300 Subject: [PATCH] update: service name --- .github/workflows/actions.yaml | 4 +++ .github/workflows/actions_branch.yaml | 33 ------------------- .github/workflows/deploy-gh-pages.yaml | 6 ---- .github/workflows/tag.yaml | 2 ++ .gitignore | 2 +- Dockerfile | 8 ++--- README.md | 8 ++--- docs/.redoclyrc | 2 +- docs/package-lock.json | 4 +-- docs/package.json | 2 +- docs/spec/openapi.yaml | 2 +- docs/web/index.hbs | 2 +- docs/web/index.html | 2 +- go.mod | 2 +- internal/broadcaster/broadcaster.go | 6 ++-- internal/cli/main.go | 8 ++--- internal/cli/migrate.go | 4 +-- internal/service/handlers/create_airdrop.go | 4 +-- internal/service/handlers/ctx.go | 4 +-- internal/service/handlers/get_airdrop.go | 6 ++-- .../service/handlers/get_airdrop_params.go | 2 +- internal/service/handlers/middleware.go | 2 +- internal/service/requests/create_airdrop.go | 2 +- internal/service/router.go | 6 ++-- main.go | 2 +- werf.yaml | 20 +++++------ 26 files changed, 56 insertions(+), 89 deletions(-) delete mode 100644 .github/workflows/actions_branch.yaml diff --git a/.github/workflows/actions.yaml b/.github/workflows/actions.yaml index 11c0936..fe3deaf 100644 --- a/.github/workflows/actions.yaml +++ b/.github/workflows/actions.yaml @@ -1,5 +1,9 @@ on: workflow_dispatch: + push: + branches: + - 'master' + - 'main' jobs: converge: diff --git a/.github/workflows/actions_branch.yaml b/.github/workflows/actions_branch.yaml deleted file mode 100644 index f85552b..0000000 --- a/.github/workflows/actions_branch.yaml +++ /dev/null @@ -1,33 +0,0 @@ -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/install@v1.2 - - - 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 diff --git a/.github/workflows/deploy-gh-pages.yaml b/.github/workflows/deploy-gh-pages.yaml index 63f357d..28016d3 100644 --- a/.github/workflows/deploy-gh-pages.yaml +++ b/.github/workflows/deploy-gh-pages.yaml @@ -1,9 +1,3 @@ -# Builds the docs and deploys to GitHub pages -# -# https://github.com/actions/setup-node -# Using https://github.com/marketplace/actions/deploy-to-github-pages -name: Deploy to Github pages - on: workflow_dispatch: push: diff --git a/.github/workflows/tag.yaml b/.github/workflows/tag.yaml index 9e0a856..64e9783 100644 --- a/.github/workflows/tag.yaml +++ b/.github/workflows/tag.yaml @@ -1,8 +1,10 @@ on: + workflow_dispatch: push: tags: - 'v[0-9]+.[0-9]+.[0-9]+' - 'v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+' + - 'v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+' jobs: converge: diff --git a/.gitignore b/.gitignore index fc71c4b..fa5f906 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,5 @@ docker-compose.yaml docs/node_modules docs/web_deploy vendor/ -airdrop-svc +evm-airdrop-svc .DS_Store \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index f574e3f..7350427 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,16 +2,16 @@ FROM golang:1.22-alpine as buildbase RUN apk add git build-base -WORKDIR /go/src/github.com/rarimo/airdrop-svc +WORKDIR /go/src/github.com/rarimo/evm-airdrop-svc COPY vendor . COPY . . -RUN GOOS=linux go build -o /usr/local/bin/airdrop-svc /go/src/github.com/rarimo/airdrop-svc +RUN GOOS=linux go build -o /usr/local/bin/evm-airdrop-svc /go/src/github.com/rarimo/evm-airdrop-svc FROM alpine:3.9 -COPY --from=buildbase /usr/local/bin/airdrop-svc /usr/local/bin/airdrop-svc +COPY --from=buildbase /usr/local/bin/evm-airdrop-svc /usr/local/bin/evm-airdrop-svc RUN apk add --no-cache ca-certificates -ENTRYPOINT ["airdrop-svc"] +ENTRYPOINT ["evm-airdrop-svc"] diff --git a/README.md b/README.md index 90729b6..e676690 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# airdrop-svc +# evm-airdrop-svc ## Description @@ -7,8 +7,8 @@ Service to manage airdrops for passport ZK-proofs ## Install ``` -git clone github.com/rarimo/airdrop-svc -cd airdrop-svc +git clone github.com/rarimo/evm-airdrop-svc +cd evm-airdrop-svc go build main.go export KV_VIPER_FILE=./config.yaml ./main migrate up @@ -17,7 +17,7 @@ export KV_VIPER_FILE=./config.yaml ## API documentation -[Online docs](https://rarimo.github.io/airdrop-svc/) are available. +[Online docs](https://rarimo.github.io/evm-airdrop-svc/) are available. All endpoints from docs MUST be publicly accessible. diff --git a/docs/.redoclyrc b/docs/.redoclyrc index d23698c..6d88558 100644 --- a/docs/.redoclyrc +++ b/docs/.redoclyrc @@ -1,5 +1,5 @@ -apiTitle: airdrop-svc +apiTitle: evm-airdrop-svc splitSpec: true codeSamples: false swaggerUI: true diff --git a/docs/package-lock.json b/docs/package-lock.json index 2994fb5..6ec8f69 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -1,11 +1,11 @@ { - "name": "airdrop-svc", + "name": "evm-airdrop-svc", "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "airdrop-svc", + "name": "evm-airdrop-svc", "version": "1.0.0", "dependencies": { "@tokend/redoc-cli": "^0.9.9", diff --git a/docs/package.json b/docs/package.json index 2398cec..40207ab 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,5 +1,5 @@ { - "name": "airdrop-svc", + "name": "evm-airdrop-svc", "version": "1.0.0", "dependencies": { "@tokend/redoc-cli": "^0.9.9", diff --git a/docs/spec/openapi.yaml b/docs/spec/openapi.yaml index d129b59..99534bb 100644 --- a/docs/spec/openapi.yaml +++ b/docs/spec/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: version: 1.0.0 - title: airdrop-svc + title: evm-airdrop-svc description: '' servers: - url: 'https://api.stage.rarime.com' diff --git a/docs/web/index.hbs b/docs/web/index.hbs index b2e9f63..e12bdda 100644 --- a/docs/web/index.hbs +++ b/docs/web/index.hbs @@ -3,7 +3,7 @@ - airdrop-svc Service Documentation + evm-airdrop-svc Service Documentation