Skip to content

Add files via upload #28

Add files via upload

Add files via upload #28

name: Validate mpackage file
on: pull_request
jobs:
check-zip-contents:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install unzip
run: sudo apt-get install -y unzip
- name: List files in the pull request
id: list-files
run: |
echo "Files changed in this PR:"
FILES=$(gh pr view https://github.com/ZookaOnGit/mudlet-package-repository/pull/3 --json files --jq '.files[].path')
echo $FILES
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Unzip archive
run: unzip -o $FILES -d unzipped_contents
- name: List contents of the ZIP file
run: ls -R unzipped_contents
- name: Check for specific file
run: |
if [ -f "unzipped_contents/config.lua" ]; then
echo "config.lua is present."
else
echo "Error: config.lua is missing."
exit 1
fi