-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(build): add gh actions #17
Merged
Merged
Changes from 17 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
f2092d0
feat(build): add gh actions
DuckySoLucky 9cfb8eb
fix(stats): types and some other things for svelte-check
DuckySoLucky 387cbbd
fix(build): if u fail ur gay
DuckySoLucky 28be271
fix(build): pro dev
DuckySoLucky 69d5181
fix(build): yes
DuckySoLucky bb23b53
fix(style): prettier
DuckySoLucky b772d52
fix(yes): yes
DuckySoLucky e1870e5
fix(gitignore): add cache folder
DuckySoLucky d86a92b
fix(yes): yes
DuckySoLucky 70e1504
yes
DuckySoLucky d828796
yes
DuckySoLucky f324e56
fix: yes
DuckySoLucky 34b6b49
fix(cli): git clone neu repo
DuckySoLucky 0912ed5
fix yes
DuckySoLucky 9daae1c
fix: yes
DuckySoLucky 484ce05
feat(build): add conflcits && codeql-analysis yml
DuckySoLucky 6ad1f2e
yes
DuckySoLucky 34ebc89
fix: oops
DuckySoLucky 7f7db8f
fix: yes
DuckySoLucky 0b9b81f
fix
DuckySoLucky 75dadab
fix: yes
DuckySoLucky 031761b
fix(style): prettier
DuckySoLucky 3b83cac
fix(gh-actions): typo
DuckySoLucky b834eb0
fix(stats): DarthGIgi's things
DuckySoLucky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,53 @@ | ||
######################################################################################## | ||
# "pnpm install" composite action for pnpm 7/8+ # | ||
#--------------------------------------------------------------------------------------# | ||
# Requirement: @setup/node should be run before # | ||
# # | ||
# Usage in workflows steps: # | ||
# # | ||
# - name: 📥 Monorepo install # | ||
# uses: ./.github/actions/pnpm-install # | ||
# with: # | ||
# enable-corepack: false # (default) # | ||
# cwd: ${{ github.workspace }}/apps/my-app # (default = '.') # | ||
# # | ||
# Reference: # | ||
# - latest: https://gist.github.com/belgattitude/838b2eba30c324f1f0033a797bab2e31 # | ||
# # | ||
# Versions: # | ||
# - 1.1.0 - 15-07-2023 - Add project custom directory support. # | ||
######################################################################################## | ||
|
||
name: "PNPM install" | ||
description: "Run pnpm install with cache enabled" | ||
|
||
inputs: | ||
enable-corepack: | ||
description: "Enable corepack" | ||
required: false | ||
default: "false" | ||
cwd: | ||
description: "Changes node's process.cwd() if the project is not located on the root. Default to process.cwd()" | ||
required: false | ||
default: "." | ||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20" | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: "9.4" | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
shell: bash | ||
working-directory: ${{ inputs.cwd }} | ||
env: | ||
HUSKY: "0" |
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,36 @@ | ||
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries | ||
name: Cleanup caches for closed branches | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
workflow_dispatch: | ||
|
||
jobs: | ||
cleanup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cleanup | ||
run: | | ||
gh extension install actions/gh-actions-cache | ||
|
||
REPO=${{ github.repository }} | ||
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge" | ||
|
||
echo "Fetching list of cache key" | ||
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 ) | ||
|
||
## Setting this to not fail the workflow while deleting cache keys. | ||
set +e | ||
echo "Deleting caches..." | ||
for cacheKey in $cacheKeysForPR | ||
do | ||
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm | ||
done | ||
echo "Done" | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,25 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
schedule: | ||
- cron: "30 1 * * *" | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
security-events: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: javascript | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
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,113 @@ | ||
name: Website | ||
|
||
on: | ||
push: | ||
paths: ["src/**", ".github/workflows/website.yml"] | ||
|
||
pull_request: | ||
paths: ["src/**", ".github/workflows/website.yml"] | ||
|
||
env: | ||
NODE_VERSION: "21" | ||
CONTAINER_REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
conflicts: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check for PR conflicts | ||
uses: eps1lon/actions-label-merge-conflict@releases/2.x | ||
with: | ||
dirtyLabel: "has conflicts" | ||
repoToken: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
security-events: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: javascript | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
|
||
es-lint: | ||
name: Check linting (es-lint) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: PNPM Install | ||
uses: ./.github/actions/pnpm-install | ||
|
||
- name: Check ESlint | ||
run: pnpm lint | ||
|
||
prettier: | ||
name: Check formatting (prettier) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: PNPM Install | ||
uses: ./.github/actions/pnpm-install | ||
|
||
- name: Check Prettier | ||
run: pnpm prettier --check . | ||
|
||
sveltecheck: | ||
name: Svelte Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: PNPM Install | ||
uses: ./.github/actions/pnpm-install | ||
|
||
- name: Make dummy env for types | ||
run: | | ||
echo "ls -a ." | ||
ls -a . | ||
mv .env.example .env | ||
|
||
- name: Check Svelte | ||
run: pnpm run check | ||
|
||
build: | ||
name: Svelte Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Clone NotEnoughUpdates-REPO | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: NotEnoughUpdates/NotEnoughUpdates-REPO | ||
path: src/lib/constants/NotEnoughUpdates-REPO/items | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: PNPM Install | ||
uses: ./.github/actions/pnpm-install | ||
|
||
- name: Make dummy env for types | ||
run: | | ||
echo "ls -a ." | ||
ls -a . | ||
mv .env.example .env | ||
|
||
- name: Svelte Build | ||
run: pnpm run build |
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
Empty file.
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
Submodule NotEnoughUpdates-REPO
updated
15 files
+2 −6 | constants/misc.json | |
+23 −0 | items/ANGLER_DEEP_SEA.json | |
+5 −1 | items/BERSERKER_SANDSTORM_CAT.json | |
+4 −1 | items/CAMPAIGN_POSTER.json | |
+5 −1 | items/FROZEN_BLAZE_FROST_KNIGHT.json | |
+21 −0 | items/JUNGLE_BED.json | |
+20 −0 | items/JUNGLE_CABIN.json | |
+20 −0 | items/JUNGLE_CHAIR.json | |
+20 −0 | items/JUNGLE_DRESSER.json | |
+20 −0 | items/JUNGLE_TABLE.json | |
+4 −1 | items/PANDA_SPIRIT.json | |
+4 −1 | items/PET_SKIN_SQUID_CHROMARI.json | |
+4 −1 | items/RABBIT_THE_FISH.json | |
+23 −0 | items/STARLIGHT_STARKNIGHT.json | |
+4 −1 | items/STEAMED_CHOCOLATE_FISH.json |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
webiste
typo