Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Docker Build

Docker Build #37

---
name: Docker Build
on:
push:
branches:
- 'main'
paths:
- 'Dockerfile'
- '.github/workflows/call-docker-build.yaml'
- 'docker-entrypoint.sh'
pull_request:
paths:
- 'Dockerfile'
- '.github/workflows/call-docker-build.yaml'
- 'docker-entrypoint.sh'
schedule:
# re-run montly to keep image fresh with upstream base images
- cron: '0 12 15 * *'
jobs:
build-jekyll-image:
# use Reusable Workflows
# https://docs.github.com/en/actions/learn-github-actions/reusing-workflows
name: Call Docker Build Jekyll
uses: bretfisher/docker-build-workflow/.github/workflows/reusable-docker-build.yaml@main
permissions:
contents: read
packages: write # needed to push docker image to ghcr.io
pull-requests: write # needed to create and update comments in PRs
secrets:
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
with:
dockerhub-enable: false
ghcr-enable: true
image-names: |
ghcr.io/tostanoski/vvh-jekyll
platforms: linux/amd64,linux/arm64
target: jekyll
build-jekyll-serve-image:
# use Reusable Workflows
# https://docs.github.com/en/actions/learn-github-actions/reusing-workflows
name: Call Docker Build Jekyll-Serve
uses: bretfisher/docker-build-workflow/.github/workflows/reusable-docker-build.yaml@main
needs: build-jekyll-image
if: github.event_name == 'push'
permissions:
contents: read
packages: write # needed to push docker image to ghcr.io
pull-requests: write # needed to create and update comments in PRs
secrets:
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
with:
dockerhub-enable: true
ghcr-enable: true
image-names: |
tostanoski/vvh-jekyll-serve
ghcr.io/tostanoski/vvh-jekyll-serve
platforms: linux/amd64,linux/arm64
target: jekyll-serve