Add files via upload #28
Workflow file for this run
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
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 |