Skip to content

Commit

Permalink
build: add arm64 to docker image platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
GiyoMoon committed Aug 12, 2024
1 parent b573133 commit 95b87ef
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 107 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
name: Security audit
name: audit

on:
schedule:
- cron: '0 0 * * 0'
- cron: '0 0 * * 1,4'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
- 'Cargo.toml'
- 'Cargo.lock'
pull_request:
paths:
- 'Cargo.toml'
- 'Cargo.lock'
workflow_dispatch:

jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
audit:
uses: giyomoon/workflows/.github/workflows/rust-audit.yml@main
with:
rust-version: nightly
128 changes: 79 additions & 49 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,47 @@
name: build
on:
push:
branches:
- main
tags:
- 'v*'
- v*
jobs:
build-java8:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Docker meta
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ghcr.io/giyomoon/eve
tags: |
type=semver,pattern={{version}}-java8
type=raw,value={{sha}}-java8,enable=${{ github.ref_type != 'tag' }}
type=raw,value=java8
flavor: |
latest=false
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push

- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
build-args: |
Expand All @@ -42,32 +51,39 @@ jobs:
build-java11:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Docker meta
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ghcr.io/giyomoon/eve
tags: |
type=semver,pattern={{version}}-java11
type=raw,value={{sha}}-java11,enable=${{ github.ref_type != 'tag' }}
type=raw,value=java11
flavor: |
latest=false
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push

- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
build-args: |
Expand All @@ -77,32 +93,39 @@ jobs:
build-java17:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Docker meta
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ghcr.io/giyomoon/eve
tags: |
type=semver,pattern={{version}}-java17
type=raw,value={{sha}}-java17,enable=${{ github.ref_type != 'tag' }}
type=raw,value=java17
flavor: |
latest=false
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push

- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
build-args: |
Expand All @@ -112,32 +135,39 @@ jobs:
build-java21:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Docker meta
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ghcr.io/giyomoon/eve
tags: |
type=semver,pattern={{version}}-java21
type=raw,value={{sha}}-java21,enable=${{ github.ref_type != 'tag' }}
type=raw,value=java21
flavor: |
latest=false
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push

- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
build-args: |
Expand Down
58 changes: 11 additions & 47 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,15 @@
name: checks
name: backend-checks

on:
push:
branches: '**'
tags:
- 'v*'
paths:
- '**'
pull_request:
paths:
- '**'

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: beta
override: true
- uses: actions-rs/cargo@v1
with:
command: check
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: beta
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: beta
override: true
components: clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
checks:
uses: giyomoon/workflows/.github/workflows/rust-checks.yml@main
with:
rust-version: nightly

0 comments on commit 95b87ef

Please sign in to comment.