forked from hfg-gmuend/openmoji
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
87cdc8b
commit 5e6d57c
Showing
2 changed files
with
67 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,46 @@ | ||
|
||
name: Create and publish a Docker image | ||
|
||
on: | ||
push: | ||
branches: ['master', 'docker-build-*'] | ||
paths: | ||
- helpers/docker/** | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
REGISTRY_OWNER: jeppeklitgaard | ||
IMAGE_NAME: font_builder | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to the 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@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.REGISTRY_OWNER }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: "helpers/docker" | ||
file: "helpers/docker/font_builder.Dockerfile" | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.REGISTRY_OWNER }}/${{ env.IMAGE_NAME }} | ||
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,21 @@ | ||
FROM python:3.11-slim-bullseye | ||
|
||
LABEL org.opencontainers.image.url="https://openmoji.org/" | ||
LABEL org.opencontainers.image.source="https:/hfg-gmuend/openmoji" | ||
LABEL org.opencontainers.image.title="OpenMoji Font Builder" | ||
LABEL org.opencontainers.image.description="Builds OpenMoji color fonts" | ||
|
||
# This image is used to build fonts using nanoemoji and process them using woff2 | ||
|
||
# We need xmlstarlet | ||
# We need GCC | ||
# Remove pip git branch install and git dependency once https:/googlefonts/picosvg/pull/279 is merged | ||
RUN apt update \ | ||
&& apt install -y --no-install-recommends xmlstarlet woff2 \ | ||
&& apt install -y --no-install-recommends git \ | ||
&& apt install -y --no-install-recommends gcc g++ \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& pip install --no-cache-dir nanoemoji==0.15.0 \ | ||
&& pip install --no-cache-dir git+https:/JeppeKlitgaard/picosvg.git@fix-assert-line-length \ | ||
&& apt purge -y --auto-remove git \ | ||
&& apt purge -y --auto-remove gcc g++ |