Skip to content

Commit

Permalink
update github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Matlefebvre1234 committed Jul 31, 2024
1 parent 45f242e commit ab239fd
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 135 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/bun-build.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
name: Build
on:
release:
types: [ published ]
release:
types: [published]

permissions:
contents: write
contents: write

jobs:
bun-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
bun-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: 'Install Dependencies'
run: bun install
- name: "Install Dependencies"
run: bun install

- name: 'Build app'
run: bun run build
- name: "Build app"
run: bun run build

- uses: softprops/action-gh-release@v1
with:
files: |
antelope-token-api
- uses: softprops/action-gh-release@v2
with:
files: |
erc20-token-api
46 changes: 23 additions & 23 deletions .github/workflows/bun-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@ name: Test
on: push

jobs:
bun-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
bun-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install bun
uses: oven-sh/setup-bun@v1
- name: Install bun
uses: oven-sh/setup-bun@v2

- name: 'Install Dependencies'
run: |
bun install
- name: "Install Dependencies"
run: |
bun install
- name: 'Run lint'
run: |
bun lint
- name: "Run lint"
run: |
bun lint
- name: 'Run test'
run: |
bun test
env:
PORT: ${{ vars.PORT }}
HOSTNAME: ${{ vars.HOSTNAME }}
HOST: ${{ vars.HOST }}
USERNAME: ${{ secrets.USERNAME }}
PASSWORD: ${{ secrets.PASSWORD }}
TABLE: ${{ secrets.TABLE }}
- name: "Run test"
run: |
bun test
env:
PORT: ${{ vars.PORT }}
HOSTNAME: ${{ vars.HOSTNAME }}
HOST: ${{ vars.HOST }}
USERNAME: ${{ secrets.USERNAME }}
PASSWORD: ${{ secrets.PASSWORD }}
TABLE: ${{ secrets.TABLE }}
74 changes: 37 additions & 37 deletions .github/workflows/ghcr.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
name: GitHub Container Registry
on:
push:
tags:
- "v*"
branches:
- "*"
push:
tags:
- "v*"
branches:
- "*"

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
ghcr:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
ghcr:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,prefix=,suffix=-{{date 'X'}}
type=raw,enable=${{ !startsWith(github.ref, 'refs/tags/') }},value=develop
type=semver,pattern={{raw}}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,prefix=,suffix=-{{date 'X'}}
type=raw,enable=${{ !startsWith(github.ref, 'refs/tags/') }},value=develop
type=semver,pattern={{raw}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Binary file modified bun.lockb
Binary file not shown.
116 changes: 59 additions & 57 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,62 +1,64 @@
{
"name": "erc20-token-api",
"description": "Get informations about ERC20 tokens",
"version": "0.0.1",
"homepage": "https://github.com/pinax-network/erc20-token-api",
"license": "MIT",
"authors": [
{
"name": "Etienne Donneger",
"email": "etienne@pinax.network",
"url": "https://github.com/0237h"
},
{
"name": "Denis Carriere",
"email": "denis@pinax.network",
"url": "https://github.com/DenisCarriere/"
},
{
"name": "Mathieu Lefebvre",
"email": "mathieu@pinax.network",
"url": "https://github.com/Matlefebvre1234/"
}
],
"dependencies": {
"@clickhouse/client-web": "latest",
"@kubb/cli": "^2.23.2",
"@kubb/core": "^2.23.2",
"commander": "latest",
"dotenv": "latest",
"ethers": "^6.12.1",
"hono": "latest",
"prom-client": "latest",
"tslog": "latest",
"typed-openapi": "latest",
"zod": "latest"
"name": "erc20-token-api",
"description": "Get informations about ERC20 tokens",
"version": "0.0.1",
"homepage": "https://github.com/pinax-network/erc20-token-api",
"license": "MIT",
"authors": [
{
"name": "Etienne Donneger",
"email": "etienne@pinax.network",
"url": "https://github.com/0237h"
},
"private": true,
"scripts": {
"build": "export APP_VERSION=$(git rev-parse --short HEAD) && bun build --compile index.ts --outfile erc20-token-api",
"clean": "bun i --force",
"dev": "export APP_VERSION=$(git rev-parse --short HEAD) && bun --watch index.ts",
"lint": "export APP_VERSION=$(git rev-parse --short HEAD) && bun run tsc --noEmit --skipLibCheck --pretty",
"start": "export APP_VERSION=$(git rev-parse --short HEAD) && bun index.ts",
"test": "bun test --coverage",
"types": "bun run tsp compile ./src/typespec && bun run typed-openapi ./tsp-output/@typespec/openapi3/openapi.json -o ./src/types/zod.gen.ts -r zod",
"types:check": "bun run tsp compile ./src/typespec --no-emit --pretty --warn-as-error",
"types:format": "bun run tsp format src/typespec/**/*.tsp",
"types:watch": "bun run tsp compile ./src/typespec --watch --pretty --warn-as-error",
"generate:": "bun run kubb --config ./kubb.config.ts"
{
"name": "Denis Carriere",
"email": "denis@pinax.network",
"url": "https://github.com/DenisCarriere/"
},
"type": "module",
"devDependencies": {
"@typespec/compiler": "latest",
"@typespec/openapi3": "latest",
"@typespec/protobuf": "latest",
"bun-types": "latest",
"typescript": "latest"
},
"prettier": {
"tabWidth": 4
{
"name": "Mathieu Lefebvre",
"email": "mathieu@pinax.network",
"url": "https://github.com/Matlefebvre1234/"
}
],
"dependencies": {
"@clickhouse/client-web": "latest",
"@kubb/cli": "^2.23.2",
"@kubb/core": "^2.23.2",
"@kubb/swagger": "^2.24.0",
"@kubb/swagger-zod": "^2.24.0",
"commander": "latest",
"dotenv": "latest",
"ethers": "^6.12.1",
"hono": "latest",
"prom-client": "latest",
"tslog": "latest",
"typed-openapi": "latest",
"zod": "latest"
},
"private": true,
"scripts": {
"build": "export APP_VERSION=$(git rev-parse --short HEAD) && bun build --compile index.ts --outfile erc20-token-api",
"clean": "bun i --force",
"dev": "export APP_VERSION=$(git rev-parse --short HEAD) && bun --watch index.ts",
"lint": "export APP_VERSION=$(git rev-parse --short HEAD) && bun run tsc --noEmit --skipLibCheck --pretty",
"start": "export APP_VERSION=$(git rev-parse --short HEAD) && bun index.ts",
"test": "bun test --coverage",
"types": "bun run tsp compile ./src/typespec && bun run typed-openapi ./tsp-output/@typespec/openapi3/openapi.json -o ./src/types/zod.gen.ts -r zod",
"types:check": "bun run tsp compile ./src/typespec --no-emit --pretty --warn-as-error",
"types:format": "bun run tsp format src/typespec/**/*.tsp",
"types:watch": "bun run tsp compile ./src/typespec --watch --pretty --warn-as-error",
"generate:": "bun run kubb --config ./kubb.config.ts"
},
"type": "module",
"devDependencies": {
"@typespec/compiler": "latest",
"@typespec/openapi3": "latest",
"@typespec/protobuf": "latest",
"bun-types": "latest",
"typescript": "latest"
},
"prettier": {
"tabWidth": 4
}
}

0 comments on commit ab239fd

Please sign in to comment.