-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: remove payments * feat: add payments
- Loading branch information
Showing
63 changed files
with
1,485 additions
and
208 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Logs** | ||
If applicable, add logs to help explain your problem. | ||
|
||
**Environment (please complete the following information):** | ||
- OS: [e.g. ubuntu 20.04] | ||
- Numary Version [e.g. 1.0.0-beta.4] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: enhancement, rfc | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Summary** | ||
|
||
**Solution proposal** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
updates: | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
schedule: | ||
- cron: '35 21 * * 5' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'go' ] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
- 'features/**' | ||
- 'feature/**' | ||
- 'feat/**' | ||
- 'fix/**' | ||
- 'hotfix/**' | ||
pull_request: | ||
types: [ assigned, opened, synchronize, reopened ] | ||
release: | ||
types: [ prereleased, released ] | ||
|
||
name: Main | ||
jobs: | ||
pr-style: | ||
if: github.event_name == 'pull_request' | ||
uses: numary/gh-workflows/.github/workflows/pr-style.yml@main | ||
|
||
lint: | ||
uses: numary/gh-workflows/.github/workflows/golang-lint.yml@main | ||
|
||
test: | ||
uses: numary/gh-workflows/.github/workflows/golang-test.yml@main | ||
|
||
goreleaser-build: | ||
if: github.event_name != 'release' | ||
uses: numary/gh-workflows/.github/workflows/goreleaser-build.yml@main | ||
needs: | ||
- lint | ||
- test | ||
|
||
goreleaser-release: | ||
if: github.event_name == 'release' | ||
uses: numary/gh-workflows/.github/workflows/goreleaser-release.yml@main | ||
secrets: | ||
FURY_TOKEN: ${{ secrets.FURY_TOKEN }} | ||
NUMARY_GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }} | ||
needs: | ||
- lint | ||
- test | ||
|
||
docker-build-push: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- lint | ||
- test | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
- run: go mod vendor | ||
- uses: docker/setup-qemu-action@v2 | ||
- uses: docker/setup-buildx-action@v2 | ||
- uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: "NumaryBot" | ||
password: ${{ secrets.NUMARY_GITHUB_TOKEN }} | ||
- if: github.event.action == 'released' | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ghcr.io/formancehq/payments:latest,ghcr.io/formancehq/payments:${{ github.event.release.tag_name }} | ||
build-args: | | ||
APP_SHA=${{ github.sha }} | ||
VERSION=${{ github.event.release.tag_name }} | ||
- if: github.event.action == 'prereleased' | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ghcr.io/formancehq/payments:${{ github.event.release.tag_name }} | ||
build-args: | | ||
APP_SHA=${{ github.sha }} | ||
VERSION=${{ github.event.release.tag_name }} | ||
- if: github.event.action != 'released' || github.event.action != 'prereleased' | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ghcr.io/formancehq/payments:${{ github.sha }} | ||
build-args: | | ||
APP_SHA=${{ github.sha }} | ||
VERSION=develop |
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
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,4 +1,6 @@ | ||
linters-settings: | ||
interfacebloat: | ||
max: 20 | ||
dupl: | ||
threshold: 30 | ||
funlen: | ||
|
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
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,19 +1,35 @@ | ||
FROM golang:1.18 AS builder | ||
FROM golang:1.19.3-bullseye AS builder | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y gcc-aarch64-linux-gnu gcc-x86-64-linux-gnu && \ | ||
ln -s /usr/bin/aarch64-linux-gnu-gcc /usr/bin/arm64-linux-gnu-gcc && \ | ||
ln -s /usr/bin/x86_64-linux-gnu-gcc /usr/bin/amd64-linux-gnu-gcc | ||
|
||
ARG TARGETARCH | ||
ARG APP_SHA | ||
ARG VERSION | ||
WORKDIR /src | ||
|
||
WORKDIR /go/src/github.com/formancehq/payments | ||
|
||
# get deps first so it's cached | ||
COPY . . | ||
WORKDIR /src/components/payments | ||
RUN go mod download | ||
RUN GOOS=linux go build -o payments \ | ||
-ldflags="-X $(cat go.mod |head -1|cut -d \ -f2)/cmd.Version=${VERSION} \ | ||
-X $(cat go.mod |head -1|cut -d \ -f2)/cmd.BuildDate=$(date +%s) \ | ||
-X $(cat go.mod |head -1|cut -d \ -f2)/cmd.Commit=${APP_SHA}" ./ | ||
|
||
FROM ubuntu:jammy | ||
RUN apt update && apt install -y ca-certificates curl && rm -rf /var/lib/apt/lists/* | ||
COPY --from=builder /src/components/payments/payments /payments | ||
EXPOSE 3068 | ||
ENV OTEL_SERVICE_NAME payments | ||
ENTRYPOINT ["/payments"] | ||
CMD ["serve"] | ||
|
||
RUN go mod vendor | ||
|
||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH \ | ||
CC=$TARGETARCH-linux-gnu-gcc \ | ||
go build -o bin/payments \ | ||
-ldflags="-X github.com/formancehq/payments/cmd.Version=${VERSION} \ | ||
-X github.com/formancehq/payments/cmd.BuildDate=$(date +%s) \ | ||
-X github.com/formancehq/payments/cmd.Commit=${APP_SHA}" ./ | ||
|
||
FROM scratch | ||
|
||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
COPY --from=builder /go/src/github.com/formancehq/payments/bin/payments /usr/local/bin/payments | ||
|
||
EXPOSE 8080 | ||
|
||
ENTRYPOINT ["payments"] | ||
ENV OTEL_SERVICE_NAME=payments | ||
CMD ["server"] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.