Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/build-fcode-utils-builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build fcode-utils-builder container

# Run manually from Actions tab
on: [workflow_dispatch]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-builder

jobs:
build-x86_64:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
file: docker/Dockerfile.builder
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
54 changes: 54 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build fcode-utils

on: [push, workflow_dispatch]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-x86_64:
runs-on: ubuntu-latest
name: fcode-utils for x86_64
steps:
- name: Checkout fcode-utils
uses: actions/checkout@v2

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build fcode-utils
uses: docker://ghcr.io/openbios/fcode-utils-builder:master
with:
args: "bash -c \"mkdir -p $(pwd)/build-$(uname -m) && make && make DESTDIR=$(pwd)/build-$(uname -m) install\""

- name: Copy localvalues
uses: docker://ghcr.io/openbios/fcode-utils-builder:master
with:
args: "bash -c \"cp -R localvalues build-$(uname -m)\""

- name: Store x86_64 artifacts
uses: actions/upload-artifact@v2
with:
name: fcode-utils-x86_64
path: |
build-x86_64

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
file: docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
3 changes: 3 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM debian:11.2

COPY build-x86_64/bin/* /usr/bin
4 changes: 4 additions & 0 deletions docker/Dockerfile.builder
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM debian:11.2

RUN apt-get -y update && \
apt-get -y install build-essential git