-
Notifications
You must be signed in to change notification settings - Fork 725
44 lines (41 loc) · 1.68 KB
/
remunusedattachments.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
42
43
44
# This is a basic workflow to help you get started with Actions
name: Remove unused attachments
# Controls when the workflow will run
on:
schedule:
- cron: '00 21 1 * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "rem-unused-attachments"
rem-unused-attachments:
# Check if the event is not triggered by a fork
if: github.repository_owner == 'mendix'
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repo
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: python _scripts/removeUnusedAttachments.py
# Creates pull request
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: Run removeUnusedAttachments.py on docs
title: '[Auto] Remove unused attachments'
body: |
Pull Request to delete attachments that are no longer used.
Check the htmltest output from the CI/CD pipeline to ensure that nothing has been removed accidentally.
branch: rem-unused-attachments
committer: MarkvanMents <Mark.van.Ments@mendix.com>
assignees: MarkvanMents
reviewers: MarkvanMents
labels: Internal WIP
add-paths: |
static/attachments/**