2024-04-10 13:29:08 +00:00
|
|
|
name: CI-check-no-dist-update
|
|
|
|
|
|
|
|
# Prohibit any change to 'dist/**' on a non-release branch
|
|
|
|
on:
|
2024-04-10 17:10:32 +00:00
|
|
|
workflow_dispatch:
|
2024-04-10 13:29:08 +00:00
|
|
|
push:
|
|
|
|
branches-ignore:
|
2024-04-10 16:22:57 +00:00
|
|
|
- 'main'
|
|
|
|
- 'release/**'
|
2024-04-10 13:29:08 +00:00
|
|
|
paths:
|
2024-04-10 16:22:57 +00:00
|
|
|
- 'dist/**'
|
2024-04-10 13:29:08 +00:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
fail-on-dist-update:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-04-10 17:10:32 +00:00
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Get changed files
|
|
|
|
id: changed-files
|
|
|
|
uses: tj-actions/changed-files@v44
|
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
dist/**
|
|
|
|
|
|
|
|
- name: Print changes to dist directory
|
|
|
|
env:
|
|
|
|
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
|
|
|
run: |
|
|
|
|
for file in ${ALL_CHANGED_FILES}; do
|
|
|
|
echo "$file was changed"
|
|
|
|
done
|
|
|
|
|
2024-04-10 13:29:08 +00:00
|
|
|
- run: |
|
|
|
|
echo "The 'dist' directory is auotmatically updated by the release process."
|
|
|
|
echo "It should not be updated manually in a non-release branch or a pull request."
|
|
|
|
exit 1
|