Skip to content

Commit

Permalink
ci: try buildjet runners (#50)
Browse files Browse the repository at this point in the history
* ci: try buildjet runners

Signed-off-by: tison <wander4096@gmail.com>

* run CI workflow on merge_group

Signed-off-by: tison <wander4096@gmail.com>

---------

Signed-off-by: tison <wander4096@gmail.com>
  • Loading branch information
tisonkun authored Feb 16, 2023
1 parent e4ffbf8 commit 793dd85
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:
tags-ignore: ['v1.*']
pull_request:
branches: [main]
merge_group:
schedule:
- cron: '4 2 * * *'

Expand Down Expand Up @@ -73,8 +74,13 @@ jobs:

docker:
if: (github.event_name != 'schedule') || (github.repository == 'korandoru/hawkeye')
name: Check Docker image
runs-on: ubuntu-latest
name: Check Docker image - ${{matrix.runner}}
strategy:
matrix:
runner:
- buildjet-4vcpu-ubuntu-2204
- buildjet-4vcpu-ubuntu-2204-arm
runs-on: ${{matrix.runner}}
steps:
- uses: actions/checkout@v3
- name: Build hawkeye
Expand Down
28 changes: 16 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,25 @@ name: Release
on:
push:
tags: ['v1.*']
pull_request:
paths: ['.github/workflows/release.yml']
workflow_dispatch:

jobs:
release-docker-image:
name: Release Docker image
runs-on: ubuntu-latest
name: Release Docker image - ${{matrix.runner}}
strategy:
matrix:
runner:
- buildjet-4vcpu-ubuntu-2204
- buildjet-4vcpu-ubuntu-2204-arm
runs-on: ${{matrix.runner}}
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2

- uses: docker/login-action@v2
if: ${{ github.event_name != 'pull_request' }}
with:
Expand All @@ -55,23 +59,24 @@ jobs:
with:
context: .
file: ./Dockerfile
platforms: linux/amd64, linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

release-native-docker-image:
name: Release Native Docker image
runs-on: ubuntu-latest
name: Release Native Docker image - ${{matrix.runner}}
strategy:
matrix:
runner:
- buildjet-4vcpu-ubuntu-2204
- buildjet-4vcpu-ubuntu-2204-arm
runs-on: ${{matrix.runner}}
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2

- uses: docker/login-action@v2
if: ${{ github.event_name != 'pull_request' }}
with:
Expand All @@ -95,7 +100,6 @@ jobs:
with:
context: .
file: ./Dockerfile.native
platforms: linux/amd64, linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 793dd85

Please sign in to comment.