From 39f678b6022c46f979cf8969dd9f9dfffba17d9d Mon Sep 17 00:00:00 2001 From: Clay Buxton Date: Wed, 4 Mar 2026 19:56:23 -0500 Subject: [PATCH] add workflow --- .gitea/workflows/build-and-push.yml | 38 +++++++++++++++++++++++++++++ pandoc-pdf/Dockerfile | 3 +++ 2 files changed, 41 insertions(+) create mode 100644 .gitea/workflows/build-and-push.yml create mode 100644 pandoc-pdf/Dockerfile diff --git a/.gitea/workflows/build-and-push.yml b/.gitea/workflows/build-and-push.yml new file mode 100644 index 0000000..cb5850f --- /dev/null +++ b/.gitea/workflows/build-and-push.yml @@ -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 diff --git a/pandoc-pdf/Dockerfile b/pandoc-pdf/Dockerfile new file mode 100644 index 0000000..7748abe --- /dev/null +++ b/pandoc-pdf/Dockerfile @@ -0,0 +1,3 @@ +FROM pandoc/core:latest + +RUN apk add --no-cache git nodejs texlive-full