Skip to content

Commit

Permalink
use reusable workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jakim929 committed Nov 27, 2023
1 parent a8cb969 commit 1f4a778
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 22 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/build-and-upload-all-services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build and upload docker images for all services

on:
workflow_dispatch:
push:
branches:
- main

jobs:
build-and-upload-skandha:
uses: ./.github/workflows/reusable/build-and-upload-bundler-service.yml
secrets: inherit
with:
bundler-name: skandha
build-and-upload-transeptor-bundler:
uses: ./.github/workflows/reusable/build-and-upload-bundler-service.yml
secrets: inherit
with:
bundler-name: transeptor-bundler
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: Build and upload docker images
name: Build and upload docker images for a bundler service

on:
workflow_dispatch:
push:
branches:
- main
workflow_call:
inputs:
bundler-name:
required: true
type: string

jobs:
backend:
build-and-upload:
name: Build and publish images
runs-on: ubuntu-latest
environment: dockerhub
Expand All @@ -29,24 +30,13 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push skandha image
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ./bundlers/skandha
file: ./bundlers/skandha/Dockerfile
context: ./bundlers/${{ inputs.bundler-name }}
file: ./bundlers/${{ inputs.bundler-name }}/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ secrets.DOCKER_HUB_ACCESS_TOKEN_USERNAME }}/aa-playground:skandha-${{ github.sha }}
${{ secrets.DOCKER_HUB_ACCESS_TOKEN_USERNAME }}/aa-playground:skandha-latest
- name: Build and push transeptor-bundler image
uses: docker/build-push-action@v4
with:
context: ./bundlers/transeptor-bundler
file: ./bundlers/transeptor-bundler/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ secrets.DOCKER_HUB_ACCESS_TOKEN_USERNAME }}/aa-playground:transeptor-bundler-${{ github.sha }}
${{ secrets.DOCKER_HUB_ACCESS_TOKEN_USERNAME }}/aa-playground:transeptor-bundler-latest
${{ secrets.DOCKER_HUB_ACCESS_TOKEN_USERNAME }}/aa-playground:${{ inputs.bundler-name }}-${{ github.sha }}
${{ secrets.DOCKER_HUB_ACCESS_TOKEN_USERNAME }}/aa-playground:${{ inputs.bundler-name }}-latest

0 comments on commit 1f4a778

Please sign in to comment.