Remove unused attachments #17
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
# 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/** |