Render Thumbnail #18
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
name: Render Thumbnail | |
on: | |
push: | |
paths: | |
- 'shared/**' | |
workflow_dispatch: | |
inputs: | |
tags: | |
description: 'Reason for manual execution' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: "{{defaultContext}}:thumbnails/render" | |
file: Dockerfile | |
push: false | |
load: true | |
tags: thumbnail-render:latest | |
outputs: type=docker | |
- name: Generate thumbnails | |
run: | | |
echo "$GITHUB_WORKSPACE" | |
docker run -v "$GITHUB_WORKSPACE/shared:/app/shared" -v "$GITHUB_WORKSPACE/thumbnails:/app/exported" thumbnail-render:latest | |
- name: Commit changes | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git status | |
git add . | |
git commit -m "Update thumbnails" | |
git push | |