Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Corey008 authored Aug 28, 2024
0 parents commit 80eb59c
Show file tree
Hide file tree
Showing 112 changed files with 58,607 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/updates-from-repos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Updates from Repos
on:
repository_dispatch:
types:
[
update-platformer-neo,
update-bouncing-box,
update-circularity,
update-first-website-hs,
update-portfolio-hs,
]
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo A
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
fetch-depth: 0

- name: Fetch changes and update
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
run: |
REPO_NAME="${{ github.event.client_payload.repo }}"
EVENT_TYPE="${{ github.event.action }}"
case $EVENT_TYPE in
update-platformer-neo)
TARGET_DIR="projects/platformer"
README_NAME="platformer.md"
;;
update-bouncing-box)
TARGET_DIR="projects/bouncing-box"
README_NAME="bouncing-box.md"
;;
update-circularity)
TARGET_DIR="projects/circularity"
README_NAME="circularity.md"
;;
update-first-website-hs)
README_NAME="first-website.md"
;;
update-portfolio-hs)
README_NAME="portfolio.md"
;;
esac
if [ -n "$TARGET_DIR" ]; then
# Delete the target directory if it exists
rm -rf "$TARGET_DIR"
# Clone the repository directly into the target directory
git clone --depth 1 https://x-access-token:${GITHUB_TOKEN}@github.com/OperationSpark/${REPO_NAME}.git "$TARGET_DIR"
# Remove the .git directory to disconnect it from the source repo
rm -rf "$TARGET_DIR/.git"
rm -rf "$TARGET_DIR/.github"
fi
# Update README if it exists
if [ -n "$README_NAME" ]; then
curl -H "Authorization: token ${GITHUB_TOKEN}" \
-H "Accept: application/vnd.github.v3.raw" \
-o "project-instructions/$README_NAME" \
-L "https://api.github.com/repos/OperationSpark/${REPO_NAME}/contents/README.md"
fi
- name: Commit and push changes
run: |
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "Update from ${{ github.event.client_payload.repo }}"
git push
22 changes: 22 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"workbench.editorAssociations": {
"*.md": "vscode.markdown.preview.editor"
},
"liveServer.settings.port": 5502,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"prettier.tabWidth": 2
}
}
Empty file added index.html
Empty file.
Empty file added portfolio.html
Empty file.
Loading

0 comments on commit 80eb59c

Please sign in to comment.