Skip to content

Commit

Permalink
added github actions workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Daan Gerits <daan@synadia.com>
  • Loading branch information
calmera committed Dec 16, 2024
1 parent c923cf5 commit 923c035
Show file tree
Hide file tree
Showing 3 changed files with 139 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/edge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# .github/workflows/release.yaml

name: Edge

on:
workflow_dispatch: {}

permissions:
contents: write
packages: write

env:
GOPRIVATE: github.com/synadia-io/*

jobs:
docker:
name: Build the docker image
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository_owner }}/connect-runtime-vanilla
tags: |
type=edge
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# .github/workflows/release.yaml

name: Release

on:
release:
types: [created]

permissions:
contents: write
packages: write

env:
GOPRIVATE: github.com/synadia-io/*

jobs:
docker:
name: Build the docker image
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository_owner }}/connect-runtime-vanilla
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# .github/workflows/test.yml

name: Test

on:
pull_request:
workflow_dispatch:

permissions:
contents: read
packages: none

env:
GOPRIVATE: github.com/synadia-io/*

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.23.2'
cache: true
cache-dependency-path: 'go.sum'
- name: Download dependencies
run: go mod download
- name: Run tests
run: go run github.com/onsi/ginkgo/v2/ginkgo -r -timeout=10m --vv --show-node-events --poll-progress-after=5s --poll-progress-interval=1s

0 comments on commit 923c035

Please sign in to comment.