Skip to content

Commit

Permalink
Merge pull request #1 from HENNGE/build-maru
Browse files Browse the repository at this point in the history
ci: add GHA to build maru
  • Loading branch information
FurqanHabibi authored May 29, 2024
2 parents 5151b9e + e503224 commit 05015ab
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/build_maru.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Based on : https://github.com/temporalio/maru/blob/master/.github/workflows/docker.yaml
name: Build and publish maru

on:
push:
branches:
- master
paths:
- temporal-bench
- .github/workflows/build_maru.yaml

jobs:
build:
name: Build and publish maru
runs-on: ubuntu-latest
permissions:
packages: write

steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: temporalio/maru

- name: Calculate Docker image labels
run: |
echo "GIT_SHA=$(git rev-parse HEAD)" >> "$GITHUB_ENV"
echo "GIT_REF=$(git rev-parse --abbrev-ref HEAD)" >> "$GITHUB_ENV"
echo "BUILD_DATE=$(git show -s --format=%cI)" >> "$GITHUB_ENV"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

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

- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: ghcr.io/HENNGE/maru:latest
context: worker/
platforms: linux/amd64,linux/arm64
labels: |
org.opencontainers.image.title=maru
org.opencontainers.image.description=Benchmarks for Temporal workflows
org.opencontainers.image.url=${{ github.event.repository.html_url }}
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.version=${{ env.GIT_REF }}
org.opencontainers.image.created=${{ env.BUILD_DATE }}
org.opencontainers.image.revision=${{ env.GIT_SHA }}
org.opencontainers.image.licenses=MIT

0 comments on commit 05015ab

Please sign in to comment.