Skip to content

Commit

Permalink
ci: change oracle-aarch64-4cpu-16gb to longhorn-infra-arm64-runners
Browse files Browse the repository at this point in the history
Signed-off-by: PoAn Yang <poan.yang@suse.com>
  • Loading branch information
FrankYang0529 authored and derekbit committed May 16, 2024
1 parent e263d54 commit 6b48da0
Showing 1 changed file with 10 additions and 29 deletions.
39 changes: 10 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,19 @@ jobs:

build-arm64-binaries:
name: Build ARM64 binaries
runs-on: oracle-aarch64-4cpu-16gb
runs-on: longhorn-infra-arm64-runners
steps:
- name: Install make curl git
run: |
sudo apt update
sudo apt-get -y install make curl git
- name: Checkout code
uses: actions/checkout@v4

- name: Install make
run: sudo apt-get install make

# Build binaries
- name: Run make ci
run: make ci
run: sudo make ci

- name: Upload binaries
uses: actions/upload-artifact@v4
Expand All @@ -54,6 +56,7 @@ jobs:
build-push-amd64-images:
name: Build and push AMD64 images
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/heads/') || startsWith(github.ref, 'refs/tags/') }}
needs: build-amd64-binaries
steps:
- name: Checkout code
Expand Down Expand Up @@ -83,23 +86,12 @@ jobs:
cp -r ./bin ./package/
- name: Login to Docker Hub
if: ${{ startsWith(github.ref, 'refs/heads/') || startsWith(github.ref, 'refs/tags/') }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

# longhornio/longhorn-instance-manager image
- name: docker-build-longhorn-instance-manager
uses: docker/build-push-action@v5
with:
context: .
push: false
platforms: linux/amd64
tags: longhornio/longhorn-instance-manager:${{ env.branch }}-head-amd64
file: package/Dockerfile
build-args: |
ARCH=amd64
- name: docker-publish-longhorn-instance-manager
if: ${{ startsWith(github.ref, 'refs/heads/') }}
uses: docker/build-push-action@v5
Expand All @@ -125,7 +117,8 @@ jobs:
build-push-arm64-images:
name: Build and push ARM64 images
runs-on: oracle-aarch64-4cpu-16gb
runs-on: longhorn-infra-arm64-runners
if: ${{ startsWith(github.ref, 'refs/heads/') || startsWith(github.ref, 'refs/tags/') }}
needs: build-arm64-binaries
steps:
- name: Checkout code
Expand Down Expand Up @@ -157,24 +150,12 @@ jobs:
cp -r ./bin ./package/
- name: Login to Docker Hub
if: ${{ startsWith(github.ref, 'refs/heads/') || startsWith(github.ref, 'refs/tags/') }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

# longhornio/longhorn-instance-manager image
- name: docker-build-longhorn-instance-manager
if: ${{ startsWith(github.ref, 'refs/heads/') }}
uses: docker/build-push-action@v5
with:
context: .
push: false
platforms: linux/arm64
tags: longhornio/longhorn-instance-manager:${{ env.branch }}-head-arm64
file: package/Dockerfile
build-args: |
ARCH=arm64
- name: docker-publish-longhorn-instance-manager
if: ${{ startsWith(github.ref, 'refs/heads/') }}
uses: docker/build-push-action@v5
Expand Down

0 comments on commit 6b48da0

Please sign in to comment.