From 98d517f8ce879538029a1add83f42a5d1e1e773d Mon Sep 17 00:00:00 2001 From: Uruk Date: Mon, 2 Oct 2023 23:32:51 +0200 Subject: [PATCH 1/5] Modify worflows and update actions --- .github/workflows/ass-ci.yml | 86 +++++++++++++++++++++++++++ .github/workflows/codeql-analysis.yml | 8 +-- .github/workflows/ts-build.yml | 15 ++--- 3 files changed, 98 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/ass-ci.yml diff --git a/.github/workflows/ass-ci.yml b/.github/workflows/ass-ci.yml new file mode 100644 index 0000000..af5ab70 --- /dev/null +++ b/.github/workflows/ass-ci.yml @@ -0,0 +1,86 @@ +name: ASS CI + +on: + pull_request: + branches: + - '*' + push: + branches: + - master + +jobs: + test: + name: Test Build + runs-on: ubuntu-latest + container: node:20-alpine + steps: + - name: Checkout + uses: actions/checkout@v4 + # Install npm 10 & TypeScript + - name: Install global packages + run: npm i -g npm@10 typescript + # Install ass dependencies (including types) + - name: Install dependencies + run: npm i --save-dev + # Compile the TypeScript files + - name: Run build script + run: npm run build + + build_and_push: + name: Build & Publish Docker Images + if: github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, '[skip ci]') + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64,linux/arm64,linux/arm/v7 + push: true + build-args: | + COMMIT_TAG=${{ github.sha }} + tags: | + tycrek/ass:master + + discord: + name: Send Discord Notification + needs: build_and_push + if: always() && github.event_name != 'pull_request' && !contains(github.event.head_commit.message, '[skip ci]') + runs-on: ubuntu-latest + steps: + - name: Get Build Job Status + uses: technote-space/workflow-conclusion-action@v3 + - name: Combine Job Status + id: status + run: | + failures=(neutral, skipped, timed_out, action_required) + if [[ ${array[@]} =~ $WORKFLOW_CONCLUSION ]]; then + echo "status=failure" >> $GITHUB_OUTPUT + else + echo "status=$WORKFLOW_CONCLUSION" >> $GITHUB_OUTPUT + fi + - name: Post Status to Discord + uses: sarisia/actions-status-discord@v1 + with: + webhook: ${{ secrets.DISCORD_WEBHOOK }} + status: ${{ steps.status.outputs.status }} + title: ${{ github.workflow }} + nofail: true diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ed39ab5..dff5c90 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,11 +39,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -54,7 +54,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -68,4 +68,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/ts-build.yml b/.github/workflows/ts-build.yml index 6aa8ce4..fa88cb2 100644 --- a/.github/workflows/ts-build.yml +++ b/.github/workflows/ts-build.yml @@ -3,6 +3,7 @@ on: push: pull_request: workflow_dispatch: + jobs: build: runs-on: ubuntu-latest @@ -10,17 +11,17 @@ jobs: ARCHIVE_NAME: ass-build-${{ github.run_id }}-${{ github.run_number }} steps: # Checkout repo - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - # Set up Node 16 + # Set up Node 20 - name: Setup Node.js environment - uses: actions/setup-node@v2.4.1 + uses: actions/setup-node@v3 with: - node-version: 16.14.0 + node-version: 20 - # Install npm 8 & TypeScript + # Install npm 10 & TypeScript - name: Install global packages - run: npm i -g npm@8 typescript + run: npm i -g npm@10 typescript # Install ass dependencies (including types) - name: Install dependencies @@ -38,7 +39,7 @@ jobs: # Upload archive as an artifact - name: Upload archive - uses: actions/upload-artifact@v2.2.4 + uses: actions/upload-artifact@v3 with: name: ${{ env.ARCHIVE_NAME }} path: ${{ env.ARCHIVE_NAME }}.zip From 425d291e4aa22c514f77255f18e89da4b8c3095b Mon Sep 17 00:00:00 2001 From: Uruk Date: Mon, 9 Oct 2023 15:38:57 +0200 Subject: [PATCH 2/5] Removed docker build and revert node version --- .github/workflows/ass-ci.yml | 86 ---------------------------------- .github/workflows/ts-build.yml | 8 ++-- 2 files changed, 4 insertions(+), 90 deletions(-) delete mode 100644 .github/workflows/ass-ci.yml diff --git a/.github/workflows/ass-ci.yml b/.github/workflows/ass-ci.yml deleted file mode 100644 index af5ab70..0000000 --- a/.github/workflows/ass-ci.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: ASS CI - -on: - pull_request: - branches: - - '*' - push: - branches: - - master - -jobs: - test: - name: Test Build - runs-on: ubuntu-latest - container: node:20-alpine - steps: - - name: Checkout - uses: actions/checkout@v4 - # Install npm 10 & TypeScript - - name: Install global packages - run: npm i -g npm@10 typescript - # Install ass dependencies (including types) - - name: Install dependencies - run: npm i --save-dev - # Compile the TypeScript files - - name: Run build script - run: npm run build - - build_and_push: - name: Build & Publish Docker Images - if: github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, '[skip ci]') - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Log in to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_TOKEN }} - - name: Log in to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: . - file: ./Dockerfile - platforms: linux/amd64,linux/arm64,linux/arm/v7 - push: true - build-args: | - COMMIT_TAG=${{ github.sha }} - tags: | - tycrek/ass:master - - discord: - name: Send Discord Notification - needs: build_and_push - if: always() && github.event_name != 'pull_request' && !contains(github.event.head_commit.message, '[skip ci]') - runs-on: ubuntu-latest - steps: - - name: Get Build Job Status - uses: technote-space/workflow-conclusion-action@v3 - - name: Combine Job Status - id: status - run: | - failures=(neutral, skipped, timed_out, action_required) - if [[ ${array[@]} =~ $WORKFLOW_CONCLUSION ]]; then - echo "status=failure" >> $GITHUB_OUTPUT - else - echo "status=$WORKFLOW_CONCLUSION" >> $GITHUB_OUTPUT - fi - - name: Post Status to Discord - uses: sarisia/actions-status-discord@v1 - with: - webhook: ${{ secrets.DISCORD_WEBHOOK }} - status: ${{ steps.status.outputs.status }} - title: ${{ github.workflow }} - nofail: true diff --git a/.github/workflows/ts-build.yml b/.github/workflows/ts-build.yml index fa88cb2..18fea88 100644 --- a/.github/workflows/ts-build.yml +++ b/.github/workflows/ts-build.yml @@ -13,15 +13,15 @@ jobs: # Checkout repo - uses: actions/checkout@v4 - # Set up Node 20 + # Set up Node 16 - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: 20 + node-version: 16.14.0 - # Install npm 10 & TypeScript + # Install npm 8 & TypeScript - name: Install global packages - run: npm i -g npm@10 typescript + run: npm i -g npm@8 typescript # Install ass dependencies (including types) - name: Install dependencies From 749341cf44caf3a1687ce4f9c549dc125c910c3b Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Wed, 11 Oct 2023 21:41:14 -0600 Subject: [PATCH 3/5] chore: remove pointless ass-x references (extremely old) --- .gitmodules | 3 --- ass-x | 1 - 2 files changed, 4 deletions(-) delete mode 100644 .gitmodules delete mode 160000 ass-x diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 766a5b1..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "ass-x"] - path = ass-x - url = git@github.com:tycrek/ass-x.git diff --git a/ass-x b/ass-x deleted file mode 160000 index 2b14313..0000000 --- a/ass-x +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2b143138ef2cb7790117709882e429f5e7680d75 From da71098ac98b4e44d5c74cfcd0b384f92f79f163 Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Wed, 11 Oct 2023 21:48:47 -0600 Subject: [PATCH 4/5] fix: added silly message for new users on 0.14.x --- src/auth.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/auth.ts b/src/auth.ts index 7e3d29b..9709cb1 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -104,7 +104,13 @@ const migrate = (authFileName = 'auth.json'): Promise => new Promise(asyn // We did it hoofuckingray .then(() => log.success('Migrated all auth & file data to new auth system')) .then(() => resolve(newUsers)) - .catch(reject); + .catch((err) => ( + log.blank().blank().blank() + .info('READ THIS', 'If you see this after installation, please run ass once again before asking for help. This error will automatically fix itself.') + .blank() + .info('Hey you', 'Read that message ^^') + .blank().blank().blank(), + reject(err))); }); /** From 471a01da850096c362108be897dc971fc8d06141 Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Wed, 11 Oct 2023 21:57:25 -0600 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=8D=91=200.14.6=20=F0=9F=8D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/README.md | 8 +++++--- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/README.md b/.github/README.md index c1d9262..8080843 100644 --- a/.github/README.md +++ b/.github/README.md @@ -1,5 +1,5 @@
-

ass

+

ass

![GitHub package.json version] @@ -15,9 +15,11 @@ By default, ass comes with a resource viewing page, which includes metadata abou ### Notice (Sep 2023) -The current release version 0.14.4 is now in "maintenence mode". What this means is I'll only be providing updates to catastrophic issues. However! I'm currently working on [a new version](https://github.com/tycrek/ass/pull/220), 0.15.0, which is a lot more stable and organized. I have no ETA but please know that I'm continuing to work on it when I can. Version 0.14.4 is still functional, just a bit rough around the edges. +The current release version 0.14.x is now in **maintenence mode**. What this means is I'll only be providing updates to catastrophic issues. -#### Developers ❤ +However! I'm currently working on [a new version](https://github.com/tycrek/ass/pull/220), 0.15.0, which is a lot more stable and organized. I have no ETA but please know that I'm continuing to work on it when I can. Version 0.14.x is still functional, just a bit rough around the edges. + +#### Developers 🧡 ass was designed with developers in mind. If you are a developer & want something changed to better suit you, let me know & we'll see what we can do! diff --git a/package-lock.json b/package-lock.json index ce0740b..58bac97 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ass", - "version": "0.14.5", + "version": "0.14.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ass", - "version": "0.14.5", + "version": "0.14.6", "license": "ISC", "dependencies": { "@tinycreek/postcss-font-magician": "^4.1.0", diff --git a/package.json b/package.json index 2005a43..4fbdbaa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ass", - "version": "0.14.5", + "version": "0.14.6", "description": "The simple self-hosted ShareX server", "main": "ass.js", "engines": {