-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
292 add a docker image publish (#294)
* trying to publish an image * trying to build exactly one dockerfile for publish * newer build and push * maybe now * removing unused package * trying to do a multiplatform build * just arm and amd then? * merging main * trying only arm64 * adding qemu to try to use more platforms * just publishing one package * publishing only on release
- Loading branch information
Showing
2 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Create and publish a Docker image | ||
|
||
on: | ||
push: | ||
branches: ['release'] | ||
tags: | ||
- '*' | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Login to Container Registry | ||
uses: docker/login-action@v2 | ||
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: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: linux/amd64 | ||
file: docker/Dockerfile.publish | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM fedora:37 | ||
|
||
RUN dnf -y update \ | ||
&& dnf -y install \ | ||
cmake \ | ||
gcc-c++ \ | ||
gdb \ | ||
git \ | ||
make \ | ||
zlib-devel \ | ||
llvm-devel \ | ||
&& dnf clean all | ||
|
||
# copy the MICM code | ||
COPY . /micm/ | ||
|
||
# build the library and run the tests | ||
RUN mkdir /build \ | ||
&& cd /build \ | ||
&& cmake \ | ||
-D CMAKE_BUILD_TYPE=release \ | ||
-D ENABLE_LLVM:BOOL=TRUE \ | ||
-D ENABLE_JSON:BOOL=TRUE \ | ||
../micm \ | ||
&& make install -j 8 | ||
|
||
WORKDIR /build |