Skip to content

Commit

Permalink
ci: build all targets
Browse files Browse the repository at this point in the history
  • Loading branch information
johnyob committed Jul 31, 2024
1 parent 428b26f commit 4917fad
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 25 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Continuous Integration

on:
pull_request: null
push:
branches:
- main
workflow_dispatch: null

env:
DOCKER_REGISTRY: ghcr.io
DOCKER_IMAGE_BASE: jstz-dev

jobs:
build-docker:
name: Build and push Docker images
strategy:
matrix:
include:
- image: x86_64
- image: riscv64
- image: aarch64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: '${{ env.DOCKER_REGISTRY }}'
username: '${{ github.actor }}'
password: '${{ secrets.GITHUB_TOKEN }}'
- name: Extract metadata
id: meta
uses: docker/metadata-action@v3
with:
images: >-
${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }}/hermit-toolchain-${{ matrix.image }}
tags: |
type=ref,event=tag
{{date 'YYYYMMDD'}}
- uses: docker/[email protected]
with:
context: .
push: true
build-args: |
TARGET=${{ matrix.image }}-hermit
cache-from: type=gha
cache-to: 'type=gha,mode=max'
tags: '${{ steps.meta.outputs.tags }}'
labels: '${{ steps.meta.outputs.labels }}'
25 changes: 0 additions & 25 deletions .github/workflows/publish.yml

This file was deleted.

0 comments on commit 4917fad

Please sign in to comment.