diff --git a/.github/workflows/docker-admin.yaml b/.github/workflows/docker-admin.yaml index 7be8e6fe..6f55b058 100644 --- a/.github/workflows/docker-admin.yaml +++ b/.github/workflows/docker-admin.yaml @@ -10,7 +10,7 @@ on: branches: ['**'] jobs: - docker: + docker-admin: runs-on: ubuntu-latest outputs: img_tag: ${{ steps.preserve_img_tag.outputs.img_tag }} @@ -47,7 +47,7 @@ jobs: concurrency: group: prs-to-afn-k8s cancel-in-progress: false - needs: docker + needs: docker-admin if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest steps: @@ -61,7 +61,7 @@ jobs: - name: PR tag change to afn-k8s env: - IMG_TAG: ${{needs.docker.outputs.img_tag}} + IMG_TAG: ${{needs.docker-admin.outputs.img_tag}} GH_TOKEN: ${{ secrets.GHA_REPO_TOKEN }} CHANGE_TYPE: admin run: | diff --git a/.github/workflows/docker-api.yml b/.github/workflows/docker-api.yml index a2d72737..bd3eaee8 100644 --- a/.github/workflows/docker-api.yml +++ b/.github/workflows/docker-api.yml @@ -10,7 +10,7 @@ on: branches: ['**'] jobs: - docker: + docker-api: runs-on: ubuntu-latest outputs: img_tag: ${{ steps.preserve_img_tag.outputs.img_tag }} @@ -39,7 +39,7 @@ jobs: extra_args: --push-retry 5 deploy: - needs: docker + needs: docker-api if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/production' runs-on: ubuntu-latest steps: @@ -74,7 +74,7 @@ jobs: ${{ secrets.AFN_MANAGER_DEPLOY_API_SCRIPT }} ghcr.io/julsemaan/anyfile-notepad/api:${{ steps.deploy-env.outputs.TARGET_IMAGE }} ${{ steps.deploy-env.outputs.TARGET_SERVERS }} pr_afn_k8s: - needs: docker + needs: docker-api concurrency: group: prs-to-afn-k8s cancel-in-progress: false @@ -91,7 +91,7 @@ jobs: - name: PR tag change to afn-k8s env: - IMG_TAG: ${{needs.docker.outputs.img_tag}} + IMG_TAG: ${{needs.docker-api.outputs.img_tag}} GH_TOKEN: ${{ secrets.GHA_REPO_TOKEN }} run: | BRANCH_ID=`date "+%Y%m%d"` diff --git a/.github/workflows/docker-client-base.yml b/.github/workflows/docker-client-base.yml index ed351273..f98a2cfe 100644 --- a/.github/workflows/docker-client-base.yml +++ b/.github/workflows/docker-client-base.yml @@ -10,7 +10,7 @@ on: branches: ['**'] jobs: - docker: + docker-client-base: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/docker-client.yml b/.github/workflows/docker-client.yml index 788b3b86..674f1cb3 100644 --- a/.github/workflows/docker-client.yml +++ b/.github/workflows/docker-client.yml @@ -1,6 +1,8 @@ name: Docker Image client on: + pull_request: + branches: ["main"] push: branches: ['**'] paths: @@ -11,7 +13,7 @@ on: branches: ['**'] jobs: - docker: + docker-client: runs-on: ubuntu-latest outputs: img_tag: ${{ steps.preserve_img_tag.outputs.img_tag }} @@ -63,11 +65,11 @@ jobs: --build-arg=SRC_IMAGE=ghcr.io/julsemaan/anyfile-notepad/client-full:${{ env.IMG_TAG }} pr_afn_k8s: - needs: docker + needs: docker-client concurrency: group: prs-to-afn-k8s cancel-in-progress: false - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/beta' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -81,7 +83,7 @@ jobs: - name: PR tag change to afn-k8s if: github.ref != 'refs/heads/beta' env: - IMG_TAG: ${{needs.docker.outputs.img_tag}} + IMG_TAG: ${{needs.docker-client.outputs.img_tag}} GH_TOKEN: ${{ secrets.GHA_REPO_TOKEN }} CHANGE_TYPE: appProdImage run: | @@ -105,7 +107,7 @@ jobs: - name: PR tag change to afn-k8s if: github.ref == 'refs/heads/beta' env: - IMG_TAG: ${{needs.docker.outputs.img_tag}} + IMG_TAG: ${{needs.docker-client.outputs.img_tag}} GH_TOKEN: ${{ secrets.GHA_REPO_TOKEN }} CHANGE_TYPE: appDevImage run: | @@ -113,7 +115,8 @@ jobs: BRANCH_NAME=tmp/$BRANCH_ID # The branch already exists from the previous step - git checkout $BRANCH_NAME + git checkout $BRANCH_NAME || true + git checkout -b $BRANCH_NAME yq -i '.backend.'$CHANGE_TYPE'.tag = "'$IMG_TAG'"' charts/afn/values.yaml diff --git a/.github/workflows/docker-pages.yaml b/.github/workflows/docker-pages.yaml index 2f62b4ce..513efeb9 100644 --- a/.github/workflows/docker-pages.yaml +++ b/.github/workflows/docker-pages.yaml @@ -10,7 +10,7 @@ on: branches: ['**'] jobs: - docker: + docker-pages: runs-on: ubuntu-latest outputs: img_tag: ${{ steps.preserve_img_tag.outputs.img_tag }} @@ -39,7 +39,7 @@ jobs: --push-retry 5 pr_afn_k8s: - needs: docker + needs: docker-pages concurrency: group: prs-to-afn-k8s cancel-in-progress: false @@ -56,7 +56,7 @@ jobs: - name: PR tag change to afn-k8s env: - IMG_TAG: ${{needs.docker.outputs.img_tag}} + IMG_TAG: ${{needs.docker-pages.outputs.img_tag}} GH_TOKEN: ${{ secrets.GHA_REPO_TOKEN }} CHANGE_TYPE: pages run: | diff --git a/.github/workflows/docker-webserver.yml b/.github/workflows/docker-webserver.yml index a75254c1..3a0b7fcc 100644 --- a/.github/workflows/docker-webserver.yml +++ b/.github/workflows/docker-webserver.yml @@ -10,7 +10,7 @@ on: branches: ['**'] jobs: - docker: + docker-webserver: runs-on: ubuntu-latest outputs: img_tag: ${{ steps.preserve_img_tag.outputs.img_tag }} @@ -39,7 +39,7 @@ jobs: extra_args: --push-retry 5 pr_afn_k8s: - needs: docker + needs: docker-webserver concurrency: group: prs-to-afn-k8s cancel-in-progress: false @@ -56,7 +56,7 @@ jobs: - name: PR tag change to afn-k8s env: - IMG_TAG: ${{needs.docker.outputs.img_tag}} + IMG_TAG: ${{needs.docker-webserver.outputs.img_tag}} GH_TOKEN: ${{ secrets.GHA_REPO_TOKEN }} run: | BRANCH_ID=`date "+%Y%m%d"` diff --git a/.vimrc b/.vimrc new file mode 100644 index 00000000..f26996c9 --- /dev/null +++ b/.vimrc @@ -0,0 +1 @@ +set wildignore+=*/bower_components diff --git a/TODO.txt b/TODO.txt index e63418d4..a531d747 100644 --- a/TODO.txt +++ b/TODO.txt @@ -3,7 +3,8 @@ X Debounce SUBMIT on contact form X Create sliding pane with adflare ad instead of infolinks X Have branch + GHA flow for BETA JS app X afn-app.sh needs exit on fail, pipe fail, etc -- Prevent Authorize prompt from always coming up +X Prevent Authorize prompt from always coming up +- Reimplement authorize prompt and switch user prompt to let users know what's up before the redirect - Implement stats monitoring via API with Prometheus - Implement dark mode in menus and for the header - Use JWT instead of session ID for afn-pp session (no need to sync sessions after) diff --git a/client/_major_notice_modal.html b/client/_major_notice_modal.html index 1eac9eec..f03e35aa 100644 --- a/client/_major_notice_modal.html +++ b/client/_major_notice_modal.html @@ -1,3 +1,10 @@ + +