-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 80eb59c
Showing
112 changed files
with
58,607 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
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
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.
Empty file.
Oops, something went wrong.