Skip to content

Commit

Permalink
Build multi-arch container image (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
fwilhe committed Aug 29, 2024
1 parent a2c47ad commit 1436f56
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ concurrency:
jobs:
build:

runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read

Expand All @@ -51,7 +51,7 @@ jobs:
path: 'build'

container-image:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs:
- build
if: github.ref == 'refs/heads/main'
Expand All @@ -62,19 +62,33 @@ jobs:
with:
java-version: '21'
distribution: 'temurin'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Login to GitHub Container Registry
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: token
password: ${{ github.token }}

- run: mkdir -p build
- uses: actions/download-artifact@v4
with:
name: build-artifacts
path: build
- run: ./build.sh
- run: podman login -u token -p ${{ github.token }} ghcr.io
- run: podman push ghcr.io/gardenlinux/glvd-api:edge
- run: podman push ghcr.io/gardenlinux/glvd-api:edge_bare
- run: ./gradlew bootJar
- run: docker buildx build --file=Containerfile --platform=linux/amd64,linux/arm64 --push
# - run: podman build --platform linux/amd64,linux/arm64 --manifest ghcr.io/gardenlinux/glvd-api:edge .
# - run: podman login -u token -p ${{ github.token }} ghcr.io
# - run: podman push ghcr.io/gardenlinux/glvd-api:edge
# - run: podman push ghcr.io/gardenlinux/glvd-api:edge_bare

dependency-submission:

runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: write

Expand All @@ -95,7 +109,7 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs:
- build
if: github.ref == 'refs/heads/main'
Expand Down

0 comments on commit 1436f56

Please sign in to comment.