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 committed May 15, 2024
1 parent e263d54 commit 5e1baf6
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 30 deletions.
37 changes: 10 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ jobs:

build-arm64-binaries:
name: Build ARM64 binaries
runs-on: oracle-aarch64-4cpu-16gb
runs-on: longhorn-infra-arm64-runners
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install make
run: sudo apt-get install make
run: |
sudo apt update
sudo apt-get -y install make curl
# Build binaries
- name: Run make ci
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,14 +117,17 @@ 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
uses: actions/checkout@v4

- name: Install make
run: sudo apt-get install make
run: |
sudo apt update
sudo apt-get -y install make curl
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -157,24 +152,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
2 changes: 1 addition & 1 deletion scripts/build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -ex

source $(dirname $0)/version

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -ex

cd $(dirname $0)

Expand Down
2 changes: 1 addition & 1 deletion scripts/validate
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -ex

cd $(dirname $0)/..

Expand Down
2 changes: 2 additions & 0 deletions scripts/version
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

echo "$PWD"

if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
DIRTY="-dirty"
fi
Expand Down

0 comments on commit 5e1baf6

Please sign in to comment.