Skip to content

Commit

Permalink
Upgrade to bun & latest substreams-sink
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Nov 21, 2023
1 parent 905e153 commit 0d774a0
Show file tree
Hide file tree
Showing 17 changed files with 176 additions and 1,257 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/bun-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Generate standalone Bun executable
on:
release:
types: [published]

permissions:
contents: write

jobs:
build-and-push-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: bun install
- run: bun run test
- run: bun run build
- uses: softprops/action-gh-release@v1
with:
files: |
substreams-sink-victoria-metrics
14 changes: 14 additions & 0 deletions .github/workflows/bun-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Bun Test

on: push

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: bun install
- run: bun run test
16 changes: 0 additions & 16 deletions .github/workflows/ci.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/ghcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: GitHub Container Registry
on:
release:
types: [ published ]

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

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

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

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

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{raw}}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
24 changes: 0 additions & 24 deletions .github/workflows/release.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/sea.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ build
.vscode
*-x64
*-arm64
*-x64.exe
*-x64.exe
substreams-sink-victoria-metrics
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM oven/bun
COPY . .
RUN bun install
ENTRYPOINT [ "bun", "./bin/cli.ts", "run" ]
Loading

0 comments on commit 0d774a0

Please sign in to comment.