Skip to content

Commit

Permalink
add gollm and funman
Browse files Browse the repository at this point in the history
  • Loading branch information
YohannParis committed Apr 22, 2024
1 parent 78b8207 commit 92b5ac5
Show file tree
Hide file tree
Showing 3 changed files with 231 additions and 2 deletions.
116 changes: 116 additions & 0 deletions .github/workflows/publish-funman-taskrunner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
---
# Automatically build and publish the funman-taskrunner to the container registry.
# This workflow is triggered on changes to the funman-taskrunner directory.

name: Build and Publish funman-taskrunner

# yamllint disable-line rule:truthy
on:
push:
paths:
- 'packages/taskrunner/**'
- 'packages/funman/**'
- '.github/workflows/**'
branches:
- 'main'
- 'use-mac-os-to-build-arm-images'
tags:
- '*'

jobs:
image-tag:
name: Get tagged image name
uses: ./.github/workflows/image-tag.yml
with:
image-name: ghcr.io/darpa-askem/funman-taskrunner

amd64:
runs-on: ubuntu-22.04
needs: image-tag
permissions:
contents: read
packages: write
steps:
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout the repository
uses: actions/checkout@v4

- name: Validate GradleW JAR
uses: gradle/actions/wrapper-validation@v3

- name: Setup Java v17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: gradle

- name: Build funman-taskrunner using Makefile
run: make image-funman-taskrunner

- name: Create image and push
uses: docker/build-push-action@v5
with:
context: .
file: ./packages/taskrunner/docker/Dockerfile.funman
platforms: linux/amd64
push: true
tags: ${{ needs.image-tag.outputs.tagged-image-name }}--amd64

arm64-emulation:
runs-on: ubuntu-22.04
needs: image-tag
permissions:
contents: read
packages: write
steps:
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Checkout the repository
uses: actions/checkout@v4

- name: Validate GradleW JAR
uses: gradle/actions/wrapper-validation@v3

- name: Setup Java v17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: gradle

- name: Build funman-taskrunner using Makefile
run: make image-funman-taskrunner

- name: Create image and push
uses: docker/build-push-action@v5
with:
context: .
file: ./packages/taskrunner/docker/Dockerfile.funman
platforms: linux/arm64
push: true
tags: ${{ needs.image-tag.outputs.tagged-image-name }}--arm64

merge-images:
name: Merge AMD64 and ARM64 images under one manifest
needs:
- image-tag
- amd64
- arm64-emulation
uses: ./.github/workflows/merge-images.yml
with:
name: ${{ needs.image-tag.outputs.tagged-image-name }}
115 changes: 115 additions & 0 deletions .github/workflows/publish-gollm-taskrunner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
---
# Automatically build and publish the gollm-taskrunner to the container registry.
# This workflow is triggered on changes to the gollm-taskrunner directory.

name: Build and Publish gollm-taskrunner

# yamllint disable-line rule:truthy
on:
push:
paths:
- 'packages/taskrunner/**'
- '.github/workflows/**'
branches:
- 'main'
- 'use-mac-os-to-build-arm-images'
tags:
- '*'

jobs:
image-tag:
name: Get tagged image name
uses: ./.github/workflows/image-tag.yml
with:
image-name: ghcr.io/darpa-askem/gollm-taskrunner

amd64:
runs-on: ubuntu-22.04
needs: image-tag
permissions:
contents: read
packages: write
steps:
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout the repository
uses: actions/checkout@v4

- name: Validate GradleW JAR
uses: gradle/actions/wrapper-validation@v3

- name: Setup Java v17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: gradle

- name: Build gollm-taskrunner using Makefile
run: make image-gollm-taskrunner

- name: Create image and push
uses: docker/build-push-action@v5
with:
context: .
file: ./packages/taskrunner/docker/Dockerfile.GoLLM
platforms: linux/amd64
push: true
tags: ${{ needs.image-tag.outputs.tagged-image-name }}--amd64

arm64-emulation:
runs-on: ubuntu-22.04
needs: image-tag
permissions:
contents: read
packages: write
steps:
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Checkout the repository
uses: actions/checkout@v4

- name: Validate GradleW JAR
uses: gradle/actions/wrapper-validation@v3

- name: Setup Java v17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: gradle

- name: Build gollm-taskrunner using Makefile
run: make image-gollm-taskrunner

- name: Create image and push
uses: docker/build-push-action@v5
with:
context: .
file: ./packages/taskrunner/docker/Dockerfile.GoLLM
platforms: linux/arm64
push: true
tags: ${{ needs.image-tag.outputs.tagged-image-name }}--arm64

merge-images:
name: Merge AMD64 and ARM64 images under one manifest
needs:
- image-tag
- amd64
- arm64-emulation
uses: ./.github/workflows/merge-images.yml
with:
name: ${{ needs.image-tag.outputs.tagged-image-name }}
2 changes: 0 additions & 2 deletions .github/workflows/publish-mira-taskrunner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ on:
paths:
- 'packages/taskrunner/**'
- 'packages/mira/**'
- '.github/workflows/**'
branches:
- 'main'
- 'use-mac-os-to-build-arm-images'
tags:
- '*'

Expand Down

0 comments on commit 92b5ac5

Please sign in to comment.