Skip to content

Commit

Permalink
Added fix for multiple builds (#63)
Browse files Browse the repository at this point in the history
* added multiple builds fix

Signed-off-by: dhruv <dhruvj797@gmail.com>

* chnaged namespace

Signed-off-by: dhruv <dhruvj797@gmail.com>

* made required changes

Signed-off-by: dhruv <dhruvj797@gmail.com>

---------

Signed-off-by: dhruv <dhruvj797@gmail.com>
Co-authored-by: Jade Carino <65225359+jadecarino@users.noreply.github.com>
  • Loading branch information
jaydee029 and jadecarino committed Aug 5, 2024
1 parent 37e255c commit c834a8b
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 32 deletions.
63 changes: 47 additions & 16 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ jobs:
build-push-galasabld:
name: Build and push galasabld artefacts
runs-on: ubuntu-latest
strategy:
matrix:
config: [{'name':'linux','arch':'amd64'},{'name':'windows','arch':'amd64'},{'name':'darwin','arch':'amd64'},{'name':'darwin','arch':'arm64'},{'name':'linux','arch':'s390x'}]

steps:
- name: Checkout code
Expand Down Expand Up @@ -67,12 +64,36 @@ jobs:
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}

- name: Push galasabld executables

- name: Push galasabld-linux-amd64 executables
uses: actions/upload-artifact@v4
with:
name: galasabld-linux-amd64
path: bin/galasabld-linux-amd64

- name: Push galasabld-windows-amd64 executables
uses: actions/upload-artifact@v4
with:
name: galasabld-windows-amd64
path: bin/galasabld-windows-amd64

- name: Push galasabld-darwin-amd64 executables
uses: actions/upload-artifact@v4
with:
name: galasabld-darwin-amd64
path: bin/galasabld-darwin-amd64

- name: Push galasabld-darwin-arm64 executables
uses: actions/upload-artifact@v4
with:
name: galasabld-${{matrix.config.name}}-${{matrix.config.arch}}
path: bin/galasabld-${{matrix.config.name}}-${{matrix.config.arch}}
name: galasabld-darwin-arm64
path: bin/galasabld-darwin-arm64

- name: Push galasabld-linux-s390x executables
uses: actions/upload-artifact@v4
with:
name: galasabld-linux-s390x
path: bin/galasabld-linux-s390x

build-push-galasabld-ibm:
name: Build and push galasabld-ibm artefact
Expand Down Expand Up @@ -126,10 +147,7 @@ jobs:
build-push-openapi2beans:
name: Build and push openapi2beans artefacts
runs-on: ubuntu-latest
strategy:
matrix:
config: [{'name':'darwin','arch':'arm64'},{'name':'darwin','arch':'x86_64'},{'name':'linux','arch':'x86_64'}]


steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -178,13 +196,25 @@ jobs:
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}

- name: Push openapi2beans executables
- name: Push openapi2beans-darwin-arm64 executables
uses: actions/upload-artifact@v4
with:
name: openapi2beans-${{matrix.config.name}}-${{matrix.config.arch}}
path: openapi2beans/bin/openapi2beans-${{matrix.config.name}}-${{matrix.config.arch}}

name: openapi2beans-darwin-arm64
path: openapi2beans/bin/openapi2beans-darwin-arm64

- name: Push openapi2beans-darwin-x86_64 executables
uses: actions/upload-artifact@v4
with:
name: openapi2beans-darwin-x86_64
path: openapi2beans/bin/openapi2beans-darwin-x86_64

- name: Push openapi2beans-linux-x86_64 executables
uses: actions/upload-artifact@v4
with:
name: openapi2beans-linux-x86_64
path: openapi2beans/bin/openapi2beans-linux-x86_64

build-push-buildutils-executables:
name: Build and push buildutils repository executables
runs-on: ubuntu-latest
Expand Down Expand Up @@ -227,3 +257,4 @@ jobs:
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}

62 changes: 46 additions & 16 deletions .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ jobs:
build-upload-galasabld:
name: Build galasabld
runs-on: ubuntu-latest
strategy:
matrix:
config: [{'name':'linux','arch':'amd64'},{'name':'windows','arch':'amd64'},{'name':'darwin','arch':'amd64'},{'name':'darwin','arch':'arm64'},{'name':'linux','arch':'s390x'}]

steps:
- name: Checkout code
Expand All @@ -32,20 +29,41 @@ jobs:
run: |
docker build -t galasabld:${{env.IMAGE_TAG}} --build-arg platform=linux-amd64 -f dockerfiles/galasabld/dockerfile.galasabld .
docker run --rm galasabld:${{env.IMAGE_TAG}}
- name: Push galasabld executables
- name: Push galasabld-linux-amd64 executables
uses: actions/upload-artifact@v4
with:
name: galasabld-${{matrix.config.name}}-${{matrix.config.arch}}-${{ github.event.number }}
path: bin/galasabld-${{matrix.config.name}}-${{matrix.config.arch}}

name: galasabld-linux-amd64
path: bin/galasabld-linux-amd64

- name: Push galasabld-windows-amd64 executables
uses: actions/upload-artifact@v4
with:
name: galasabld-windows-amd64
path: bin/galasabld-windows-amd64

- name: Push galasabld-darwin-amd64 executables
uses: actions/upload-artifact@v4
with:
name: galasabld-darwin-amd64
path: bin/galasabld-darwin-amd64

- name: Push galasabld-darwin-arm64 executables
uses: actions/upload-artifact@v4
with:
name: galasabld-darwin-arm64
path: bin/galasabld-darwin-arm64

- name: Push galasabld-linux-s390x executables
uses: actions/upload-artifact@v4
with:
name: galasabld-linux-s390x
path: bin/galasabld-linux-s390x

build-upload-openapi2beans:
name: Build openapi2beans
runs-on: ubuntu-latest
strategy:
matrix:
config: [{'name':'darwin','arch':'arm64'},{'name':'darwin','arch':'x86_64'},{'name':'linux','arch':'x86_64'}]


steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -63,9 +81,21 @@ jobs:
run: |
docker build -t openapi2beans:${{env.IMAGE_TAG}} --build-arg platform=linux-x86_64 -f dockerfiles/openapi2beans/dockerfile.openapi2beans .
docker run --rm openapi2beans:${{env.IMAGE_TAG}}
- name: Push openapi2beans executables
- name: Push openapi2beans-darwin-arm64 executables
uses: actions/upload-artifact@v4
with:
name: openapi2beans-darwin-arm64
path: openapi2beans/bin/openapi2beans-darwin-arm64

- name: Push openapi2beans-darwin-x86_64 executables
uses: actions/upload-artifact@v4
with:
name: openapi2beans-darwin-x86_64
path: openapi2beans/bin/openapi2beans-darwin-x86_64

- name: Push openapi2beans-linux-x86_64 executables
uses: actions/upload-artifact@v4
with:
name: openapi2beans-${{matrix.config.name}}-${{matrix.config.arch}}-${{ github.event.number }}
path: openapi2beans/bin/openapi2beans-${{matrix.config.name}}-${{matrix.config.arch}}
name: openapi2beans-linux-x86_64
path: openapi2beans/bin/openapi2beans-linux-x86_64

0 comments on commit c834a8b

Please sign in to comment.