-
Notifications
You must be signed in to change notification settings - Fork 7
42 lines (38 loc) · 1.11 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Render Thumbnail
on:
pull_request:
paths:
- 'shared/**'
workflow_dispatch:
inputs:
tags:
description: 'Reason for manual execution'
permissions:
contents: write
pull-requests: write
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: |
git config user.name github-actions
git config user.email [email protected]
docker run -v "$GITHUB_WORKSPACE/shared:/app/shared" -v "$GITHUB_WORKSPACE/thumbnails:/app/exported" thumbnail-render:latest
echo "Commiting changes on $GITHUB_HEAD_REF"
git add .
git commit -m "Update thumbnails"
git push origin $GITHUB_HEAD_REF