diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..f3f4132a --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,53 @@ +name: CI test and build + +on: + push: + pull_request: + types: [opened] + branches: + - main + +# env settings for github releases +# docker image push +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + # build and push image to github container registry + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + attestations: write + id-token: write + steps: + - name: Checkout repository + uses: actions/checkout@v4.2.1 + - name: Log in to the Container registry + uses: docker/login-action@v3.3.0 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5.5.1 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + - name: Build and push Docker image + id: push + uses: docker/build-push-action@v6.9.0 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + # https://docs.github.com/en/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v1.4.3 + with: + subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} + subject-digest: ${{ steps.push.outputs.digest }} + push-to-registry: true diff --git a/Dockerfile b/Dockerfile index 9dabf129..b4ae8f0e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,10 @@ # build stage -FROM node:12-alpine as build-stage +FROM node:16-alpine as build-stage ENV JQ_VERSION=1.6 RUN wget --no-check-certificate https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64 -O /tmp/jq-linux64 RUN cp /tmp/jq-linux64 /usr/bin/jq RUN chmod +x /usr/bin/jq +RUN apk add --no-cache git WORKDIR /app COPY . . COPY src/docker-config.json src/config.json diff --git a/example.env b/example.env index 22015a43..c3e3f7eb 100644 --- a/example.env +++ b/example.env @@ -1,2 +1,3 @@ VUE_APP_BACKEND_URL=http://localhost:4000 VUE_APP_OLD_BACKEND_URL=http://localhost:8080 +VUE_APP_API_KEY=ABC123 diff --git a/package.json b/package.json index 872e2778..155482e0 100644 --- a/package.json +++ b/package.json @@ -19,33 +19,34 @@ "url": "git://github.com/epochtalk/epochtalk-vue" }, "dependencies": { - "@fortawesome/fontawesome-free": "^5.15.1", - "@vueform/multiselect": "^1.2.5", - "axios": "^0.21.0", - "core-js": "^3.6.5", - "dayjs": "^1.9.6", - "emittery": "^0.10.1", - "jquery": "^3.6.0", - "nestable": "git+https://github.com/slickage/Nestable.git", + "@fortawesome/fontawesome-free": "^6.4.0", + "@vueform/multiselect": "^2.6.2", + "axios": "^1.4.0", + "core-js": "^3.32.0", + "dayjs": "^1.11.8", + "emittery": "^1.0.1", + "jquery": "^3.7.0", + "nestable": "https://github.com/epochtalk/Nestable.git", "normalize.css": "^8.0.1", "nprogress": "^0.2.0", - "sass": "^1.55.0", - "slugify": "^1.6.1", - "socketcluster-client": "^14.3.2", - "swrv": "^1.0.0-beta.5", - "vue": "^3.0.0", - "vue-router": "^4.0.6", + "phoenix": "^1.7.7", + "sass": "^1.64.1", + "slugify": "^1.6.6", + "socketcluster-client": "^17.1.1", + "swrv": "^1.0.3", + "vue": "^3.3.4", + "vue-router": "^4.2.2", "vuedraggable": "^4.1.0" }, "devDependencies": { + "@babel/eslint-parser": "^7.21.8", "@vue/cli-plugin-babel": "~5.0.8", "@vue/cli-plugin-eslint": "~5.0.8", "@vue/cli-service": "~5.0.8", - "@vue/compiler-sfc": "^3.0.0", - "babel-eslint": "^10.1.0", - "eslint": "^7.27.0", - "eslint-plugin-vue": "^7.0.0-0", - "sass-loader": "^10" + "@vue/compiler-sfc": "^3.3.4", + "eslint": "^8.46.0", + "eslint-plugin-vue": "^9.14.1", + "sass-loader": "^13.3.1" }, "eslintConfig": { "root": true, @@ -57,9 +58,11 @@ "eslint:recommended" ], "parserOptions": { - "parser": "babel-eslint" + "parser": "@babel/eslint-parser" }, - "rules": {} + "rules": { + "vue/multi-word-component-names": "off" + } }, "browserslist": [ "> 1%", diff --git a/public/index.html b/public/index.html index 4b39f430..4d1748fa 100644 --- a/public/index.html +++ b/public/index.html @@ -5,18 +5,18 @@ -