add workflow
Some checks failed
Build and Push Containers / build-and-push (push) Has been cancelled

This commit is contained in:
2026-03-04 19:56:23 -05:00
parent e4d436996d
commit 39f678b602
2 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
name: Build and Push Containers
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push each container
run: |
for dir in */; do
dir="${dir%/}"
if [ -f "$dir/Dockerfile" ]; then
echo "Building $dir..."
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag ${{ secrets.DOCKERHUB_USERNAME }}/${dir}:latest \
--tag ${{ secrets.DOCKERHUB_USERNAME }}/${dir}:${{ github.sha }} \
--push \
"$dir"
fi
done

3
pandoc-pdf/Dockerfile Normal file
View File

@@ -0,0 +1,3 @@
FROM pandoc/core:latest
RUN apk add --no-cache git nodejs texlive-full