Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
thewilloftheshadow committed Dec 21, 2024
1 parent bb96561 commit 9174852
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build and Publish Docker Images

on:
push:
branches:
- main
workflow_dispatch:

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

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

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get list of Dockerfiles
id: dockerfiles
run: |
echo "files=$(find . -type f -name "*.Dockerfile" | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push Docker images
run: |
for dockerfile in $(echo '${{ steps.dockerfiles.outputs.files }}' | jq -r '.[]'); do
name=$(basename "$dockerfile" .Dockerfile)
# Build and push with both latest and SHA tags
docker buildx build \
--file "$dockerfile" \
--push \
--tag "ghcr.io/buape/dockyard-${name}:latest" \
--tag "ghcr.io/buape/dockyard-${name}:${GITHUB_SHA}" \
--cache-from "type=gha" \
--cache-to "type=gha,mode=max" \
.
echo "Built and pushed ghcr.io/buape/dockyard-${name}"
done
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Dockyard

This repo is used to host a collection of Docker images that we build off of internally for our projects.
4 changes: 4 additions & 0 deletions images/bun_canvas.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM oven/bun:1.1-alpine AS base
RUN apk add --no-cache libc6-compat build-base g++ cairo-dev pango-dev jpeg-dev imagemagick openssl
RUN bun i -g node-gyp
WORKDIR /app

0 comments on commit 9174852

Please sign in to comment.