Skip to content

Commit

Permalink
remove matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
fedemaleh committed Jul 5, 2024
1 parent 87a7c82 commit 57376d4
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 13 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/a.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: ci-nullplatform
env:
NULLPLATFORM_API_KEY: ${{ secrets.NULLPLATFORM_API_KEY }}
on:
push:
branches:
- master
- main
- fix/runner-authorization
permissions:
id-token: write
contents: read
packages: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- asset-arch: linux/amd64
runner-arch: linux-x64
asset-name: runner-linux-amd64
- asset-arch: linux/arm64
runner-arch: linux-arm64
asset-name: runner-linux-arm64
steps:
- name: Install nullplatform cli
run: curl https://cli.nullplatform.com/install.sh | sh
- name: Checkout code
uses: actions/checkout@v4
- name: Start nullplatform CI
run: np build start
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build asset
run: docker buildx build --build-arg ARCH=${{ matrix.platform.runner-arch }} --platform ${{ matrix.platform.asset-arch }} -t ${{ matrix.platform.asset-name }} --load .
- name: Push ARM asset
run: np asset push --type docker-image --source ${{ matrix.platform.asset-name }} --name ${{ matrix.platform.asset-name }}
- name: End nullplatform CI
if: ${{ always() }}
run: np build update --status ${{ contains(fromJSON('["failure", "cancelled"]'), job.status) && 'failed' || 'successful' }}
21 changes: 8 additions & 13 deletions .github/workflows/ci-ecr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ env:
on:
push:
branches:
- master
- main
- master
- fix/runner-authorization
permissions:
id-token: write
Expand All @@ -14,15 +14,6 @@ permissions:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- asset-arch: linux/amd64
runner-arch: linux-x64
asset-name: runner-linux-amd64
- asset-arch: linux/arm64
runner-arch: linux-arm64
asset-name: runner-linux-arm64
steps:
- name: Install nullplatform cli
run: curl https://cli.nullplatform.com/install.sh | sh
Expand All @@ -34,10 +25,14 @@ jobs:
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build asset
run: docker buildx build --build-arg ARCH=${{ matrix.platform.runner-arch }} --platform ${{ matrix.platform.asset-arch }} -t ${{ matrix.platform.asset-name }} --load .
- name: Build AMD asset
run: docker buildx build --platform linux/amd64 --build-arg linux-x64 -t amd --load .
- name: Build ARM asset
run: docker buildx build --platform linux/arm64 --build-arg linux-arm64 -t arm --load .
- name: Push AMD asset
run: np asset push --type docker-image --source amd --name runner-linux-amd64
- name: Push ARM asset
run: np asset push --type docker-image --source ${{ matrix.platform.asset-name }} --name ${{ matrix.platform.asset-name }}
run: np asset push --type docker-image --source arm --name runner-linux-arm64
- name: End nullplatform CI
if: ${{ always() }}
run: np build update --status ${{ contains(fromJSON('["failure", "cancelled"]'), job.status) && 'failed' || 'successful' }}

0 comments on commit 57376d4

Please sign in to comment.