From 22b95005994eafb37e8923d779066a12481bde74 Mon Sep 17 00:00:00 2001 From: mahula Date: Sun, 4 Aug 2024 21:14:06 +0200 Subject: [PATCH 01/12] pin all github actions by commit hash --- .github/workflows/check-documentation.yml | 12 +++--- .../workflows/cleanup-cache-at-pr-closing.yml | 2 +- .github/workflows/deploy-documentation.yml | 10 ++--- .../workflows/frontend.deploy.chromatic.yml | 2 +- .../workflows/frontend.test.build.code.yml | 6 +-- .../workflows/frontend.test.build.docker.yml | 8 ++-- .../workflows/frontend.test.build.docs.yml | 6 +-- .../frontend.test.build.storybook.yml | 6 +-- .github/workflows/frontend.test.lint.code.yml | 6 +-- .github/workflows/frontend.test.unit.code.yml | 6 +-- .github/workflows/publish.yml | 38 +++++++++---------- .github/workflows/test-backend.yml | 20 +++++----- .github/workflows/test-e2e.yml | 8 ++-- .github/workflows/test-webapp.yml | 16 ++++---- .github/workflows/test.lint_pr.yml | 2 +- 15 files changed, 74 insertions(+), 74 deletions(-) diff --git a/.github/workflows/check-documentation.yml b/.github/workflows/check-documentation.yml index ad0d6e17e..522c1523f 100644 --- a/.github/workflows/check-documentation.yml +++ b/.github/workflows/check-documentation.yml @@ -11,10 +11,10 @@ jobs: documentation: ${{ steps.changes.outputs.documentation }} steps: - name: Checkout code - uses: actions/checkout@master + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for markdown file changes - uses: dorny/paths-filter@v3.0.2 + uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} @@ -28,13 +28,13 @@ jobs: if: needs.files-changed.outputs.markdown == 'true' steps: - name: Checkout code - uses: actions/checkout@master + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Remove old documentation files run: rm -rf ./deployment/src/old/ ./CHANGELOG.md # workaround until https://github.com/gaurav-nelson/github-action-markdown-link-check/pull/183 has been done - name: Check Markdown Links - uses: gaurav-nelson/github-action-markdown-link-check@master + uses: gaurav-nelson/github-action-markdown-link-check@7d83e59a57f3c201c76eed3d33dff64ec4452d27 # 1.0.15 with: use-quiet-mode: 'yes' use-verbose-mode: 'no' @@ -51,10 +51,10 @@ jobs: if: needs.files-changed.outputs.documentation == 'true' steps: - name: Checkout code - uses: actions/checkout@master + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Setup Node 20 - uses: actions/setup-node@v4 + uses: actions/setup-node@26961cf329f22f6837d5f54c3efd76b480300ace # v4.0.3 with: node-version: '20' diff --git a/.github/workflows/cleanup-cache-at-pr-closing.yml b/.github/workflows/cleanup-cache-at-pr-closing.yml index 6512d1d64..7424e2876 100644 --- a/.github/workflows/cleanup-cache-at-pr-closing.yml +++ b/.github/workflows/cleanup-cache-at-pr-closing.yml @@ -22,7 +22,7 @@ jobs: continue-on-error: true steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Cleanup run: | diff --git a/.github/workflows/deploy-documentation.yml b/.github/workflows/deploy-documentation.yml index 3f5fc2735..82081ff93 100644 --- a/.github/workflows/deploy-documentation.yml +++ b/.github/workflows/deploy-documentation.yml @@ -13,10 +13,10 @@ jobs: documentation: ${{ steps.changes.outputs.documentation }} steps: - name: Checkout code - uses: actions/checkout@master + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for file changes - uses: dorny/paths-filter@master + uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} @@ -27,10 +27,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Setup Node 20 - uses: actions/setup-node@v4 + uses: actions/setup-node@26961cf329f22f6837d5f54c3efd76b480300ace # v4.0.3 with: node-version: 20 @@ -38,7 +38,7 @@ jobs: run: npm install && npm run docs:build - name: Deploy Vuepress to Github Pages - uses: crazy-max/ghaction-github-pages@v4 + uses: crazy-max/ghaction-github-pages@cda5497acf90563d34489ed832a67c2c50353a16 # v4.0.0 with: target_branch: gh-pages build_dir: .vuepress/dist diff --git a/.github/workflows/frontend.deploy.chromatic.yml b/.github/workflows/frontend.deploy.chromatic.yml index 280083383..c1f3fbcae 100644 --- a/.github/workflows/frontend.deploy.chromatic.yml +++ b/.github/workflows/frontend.deploy.chromatic.yml @@ -12,7 +12,7 @@ jobs: WORKING_DIRECTORY: ./frontend steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 with: fetch-depth: 0 diff --git a/.github/workflows/frontend.test.build.code.yml b/.github/workflows/frontend.test.build.code.yml index 335ea3cbe..135fe216d 100644 --- a/.github/workflows/frontend.test.build.code.yml +++ b/.github/workflows/frontend.test.build.code.yml @@ -11,10 +11,10 @@ jobs: outputs: changes: ${{ steps.changes.outputs.frontend-test-build-code }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for frontend file changes - uses: dorny/paths-filter@v3.0.2 + uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} @@ -30,7 +30,7 @@ jobs: WORKING_DIRECTORY: ./frontend steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Frontend | Build run: npm install && npm run build diff --git a/.github/workflows/frontend.test.build.docker.yml b/.github/workflows/frontend.test.build.docker.yml index 0f88830d8..1f39f0537 100644 --- a/.github/workflows/frontend.test.build.docker.yml +++ b/.github/workflows/frontend.test.build.docker.yml @@ -11,10 +11,10 @@ jobs: outputs: changes: ${{ steps.changes.outputs.frontend-test-build-docker }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for frontend file changes - uses: dorny/paths-filter@v3.0.2 + uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} @@ -30,7 +30,7 @@ jobs: WORKING_DIRECTORY: ./frontend steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Frontend | Build Docker Production run: docker compose -f docker-compose.yml build @@ -45,7 +45,7 @@ jobs: WORKING_DIRECTORY: ./frontend steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Frontend | Build Docker Development run: docker compose build diff --git a/.github/workflows/frontend.test.build.docs.yml b/.github/workflows/frontend.test.build.docs.yml index 9211abfd9..67ca9bb2f 100644 --- a/.github/workflows/frontend.test.build.docs.yml +++ b/.github/workflows/frontend.test.build.docs.yml @@ -11,10 +11,10 @@ jobs: outputs: changes: ${{ steps.changes.outputs.frontend-test-build-docs }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for frontend file changes - uses: dorny/paths-filter@v3.0.2 + uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} @@ -30,7 +30,7 @@ jobs: WORKING_DIRECTORY: ./frontend steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Frontend | Build Docs run: npm install && npm run docs:build diff --git a/.github/workflows/frontend.test.build.storybook.yml b/.github/workflows/frontend.test.build.storybook.yml index 9cadcd23e..66cbff3e8 100644 --- a/.github/workflows/frontend.test.build.storybook.yml +++ b/.github/workflows/frontend.test.build.storybook.yml @@ -11,10 +11,10 @@ jobs: outputs: changes: ${{ steps.changes.outputs.frontend-test-build-storybook }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for frontend file changes - uses: dorny/paths-filter@v3.0.2 + uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} @@ -30,7 +30,7 @@ jobs: WORKING_DIRECTORY: ./frontend steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Frontend | Build Storybook run: npm install && npm run storybook:build diff --git a/.github/workflows/frontend.test.lint.code.yml b/.github/workflows/frontend.test.lint.code.yml index 7cba5e811..c4723f6e7 100644 --- a/.github/workflows/frontend.test.lint.code.yml +++ b/.github/workflows/frontend.test.lint.code.yml @@ -11,10 +11,10 @@ jobs: outputs: changes: ${{ steps.changes.outputs.frontend-test-lint-code }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for frontend file changes - uses: dorny/paths-filter@v3.0.2 + uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} @@ -30,7 +30,7 @@ jobs: WORKING_DIRECTORY: ./frontend steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Frontend | Lint run: npm install && npm run test:lint diff --git a/.github/workflows/frontend.test.unit.code.yml b/.github/workflows/frontend.test.unit.code.yml index 00dd78ded..21cdb0fee 100644 --- a/.github/workflows/frontend.test.unit.code.yml +++ b/.github/workflows/frontend.test.unit.code.yml @@ -11,10 +11,10 @@ jobs: outputs: changes: ${{ steps.changes.outputs.frontend-test-unit-code }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for frontend file changes - uses: dorny/paths-filter@v3.0.2 + uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} @@ -30,7 +30,7 @@ jobs: WORKING_DIRECTORY: ./frontend steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Frontend | Unit run: npm install && npm run test:unit diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 416508542..7aa6351a3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Setup env run: | echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV @@ -34,7 +34,7 @@ jobs: - name: Neo4J | Save docker image run: docker save "ocelotsocialnetwork/neo4j-community" > /tmp/neo4j.tar - name: Upload Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5 with: name: docker-neo4j-community path: /tmp/neo4j.tar @@ -47,7 +47,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Setup env run: | echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV @@ -83,7 +83,7 @@ jobs: - name: Backend | Save docker image run: docker save "ocelotsocialnetwork/backend" > /tmp/backend.tar - name: Upload Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5 with: name: docker-backend-production path: /tmp/backend.tar @@ -96,7 +96,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Setup env run: | echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV @@ -132,7 +132,7 @@ jobs: - name: Webapp | Save docker image run: docker save "ocelotsocialnetwork/webapp" > /tmp/webapp.tar - name: Upload Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5 with: name: docker-webapp-production path: /tmp/webapp.tar @@ -145,7 +145,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Setup env run: | echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV @@ -184,7 +184,7 @@ jobs: - name: Maintenance | Save docker image run: docker save "ocelotsocialnetwork/maintenance" > /tmp/maintenance.tar - name: Upload Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5 with: name: docker-maintenance-production path: /tmp/maintenance.tar @@ -201,25 +201,25 @@ jobs: DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} steps: - name: Download Docker Image (Neo4J) - uses: actions/download-artifact@v4 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: docker-neo4j-community path: /tmp - run: docker load < /tmp/neo4j.tar - name: Download Docker Image (Backend) - uses: actions/download-artifact@v4 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: docker-backend-production path: /tmp - run: docker load < /tmp/backend.tar - name: Download Docker Image (WebApp) - uses: actions/download-artifact@v4 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: docker-webapp-production path: /tmp - run: docker load < /tmp/webapp.tar - name: Download Docker Image (Maintenance) - uses: actions/download-artifact@v4 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: docker-maintenance-production path: /tmp @@ -243,7 +243,7 @@ jobs: needs: [upload_to_dockerhub] steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 with: fetch-depth: 0 # Fetch full History for changelog - name: Setup env @@ -253,7 +253,7 @@ jobs: echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV - run: echo "BUILD_VERSION=${VERSION}-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV - name: package-version-to-git-tag + build number - uses: pkgdeps/git-tag-action@v3 + uses: pkgdeps/git-tag-action@81b45ff87eb7f7bd49e76e2bed448990d4dd72b3 # v3.0.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} github_repo: ${{ github.repository }} @@ -267,7 +267,7 @@ jobs: - name: package-version-to-git-release continue-on-error: true # Will fail if tag exists id: create_release - uses: actions/create-release@v1 + uses: actions/create-release@4c11c9fe1dcd9636620a16455165783b20fc7ea0 # v1.1.4 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token with: @@ -283,7 +283,7 @@ jobs: needs: [github_tag] steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 with: fetch-depth: 0 # Fetch full History for changelog - name: Setup env @@ -293,7 +293,7 @@ jobs: echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV - run: echo "BUILD_VERSION=${VERSION}-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV #- name: Repository Dispatch - # uses: peter-evans/repository-dispatch@v3 + # uses: peter-evans/repository-dispatch@1ebfb41781aa0fae446773941d0b3025198fc1a9 # v3.0.0 # with: # token: ${{ github.token }} # event-type: trigger-ocelot-build-success @@ -301,7 +301,7 @@ jobs: # client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "VERSION": "${VERSION}", "BUILD_DATE": "${BUILD_DATE}", "BUILD_COMMIT": "${BUILD_COMMIT}", "BUILD_VERSION": "${BUILD_VERSION}"}' - name: Repository Dispatch stage.ocelot.social - uses: peter-evans/repository-dispatch@v3 + uses: peter-evans/repository-dispatch@1ebfb41781aa0fae446773941d0b3025198fc1a9 # v3.0.0 with: token: ${{ secrets.OCELOT_PUBLISH_EVENT_PAT }} # this token is required to access the other repository event-type: trigger-ocelot-build-success @@ -309,7 +309,7 @@ jobs: client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "GITHUB_RUN_NUMBER": "${{ env.GITHUB_RUN_NUMBER }}", "VERSION": "${VERSION}", "BUILD_DATE": "${BUILD_DATE}", "BUILD_COMMIT": "${BUILD_COMMIT}", "BUILD_VERSION": "${BUILD_VERSION}"}' - name: Repository Dispatch stage.yunite.me - uses: peter-evans/repository-dispatch@v3 + uses: peter-evans/repository-dispatch@1ebfb41781aa0fae446773941d0b3025198fc1a9 # v3.0.0 with: token: ${{ secrets.OCELOT_PUBLISH_EVENT_PAT }} # this token is required to access the other repository event-type: trigger-ocelot-build-success diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml index 1574b7cee..b92cdacac 100644 --- a/.github/workflows/test-backend.yml +++ b/.github/workflows/test-backend.yml @@ -11,10 +11,10 @@ jobs: backend: ${{ steps.changes.outputs.backend }} docker: ${{ steps.changes.outputs.docker }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for backend file changes - uses: dorny/paths-filter@v3.0.2 + uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Neo4J | Build 'community' image run: | @@ -37,7 +37,7 @@ jobs: - name: Cache docker images id: cache-neo4j - uses: actions/cache/save@v4.0.2 + uses: actions/cache/sav@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 with: path: /tmp/neo4j.tar key: ${{ github.run_id }}-backend-neo4j-cache @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: backend | Build 'test' image run: | @@ -58,7 +58,7 @@ jobs: - name: Cache docker images id: cache-backend - uses: actions/cache/save@v4.0.2 + uses: actions/cache/sav@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 with: path: /tmp/backend.tar key: ${{ github.run_id }}-backend-cache @@ -70,7 +70,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: backend | Lint run: cd backend && yarn && yarn run lint @@ -84,17 +84,17 @@ jobs: checks: write steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Restore Neo4J cache - uses: actions/cache/restore@v4.0.2 + uses: actions/cache/restore@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 with: path: /tmp/neo4j.tar key: ${{ github.run_id }}-backend-neo4j-cache fail-on-cache-miss: true - name: Restore Backend cache - uses: actions/cache/restore@v4.0.2 + uses: actions/cache/restore@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 with: path: /tmp/backend.tar key: ${{ github.run_id }}-backend-cache diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index fabb2a3f1..734006ef1 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Copy env files run: | @@ -37,7 +37,7 @@ jobs: - name: Cache docker images id: cache - uses: actions/cache/save@v4.0.2 + uses: actions/cache/sav@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 with: path: | /opt/cucumber-json-formatter @@ -59,7 +59,7 @@ jobs: job: [1, 2, 3, 4, 5, 6, 7, 8] steps: - name: Restore cache - uses: actions/cache/restore@v4.0.2 + uses: actions/cache/restore@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 id: cache with: path: | @@ -93,7 +93,7 @@ jobs: - name: Full stack tests | if tests failed, upload report id: e2e-report if: ${{ failure() && steps.e2e-tests.conclusion == 'failure' }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5 with: name: ocelot-e2e-test-report-pr${{ needs.docker_preparation.outputs.pr-number }} path: /home/runner/work/Ocelot-Social/Ocelot-Social/cypress/reports/cucumber_html_report diff --git a/.github/workflows/test-webapp.yml b/.github/workflows/test-webapp.yml index 2a6593994..2d832315f 100644 --- a/.github/workflows/test-webapp.yml +++ b/.github/workflows/test-webapp.yml @@ -11,10 +11,10 @@ jobs: docker: ${{ steps.changes.outputs.docker }} webapp: ${{ steps.changes.outputs.webapp }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for frontend file changes - uses: dorny/paths-filter@v3.0.2 + uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check translation files run: | @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Webapp | Build 'test' image run: | @@ -50,7 +50,7 @@ jobs: docker save "ocelotsocialnetwork/webapp:test" > /tmp/webapp.tar - name: Cache docker image - uses: actions/cache/save@v4.0.2 + uses: actions/cache/sav@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 with: path: /tmp/webapp.tar key: ${{ github.run_id }}-webapp-cache @@ -62,7 +62,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: webapp | Lint run: cd webapp && yarn && yarn run lint @@ -76,10 +76,10 @@ jobs: checks: write steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Restore webapp cache - uses: actions/cache/restore@v4.0.2 + uses: actions/cache/restore@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 with: path: /tmp/webapp.tar key: ${{ github.run_id }}-webapp-cache diff --git a/.github/workflows/test.lint_pr.yml b/.github/workflows/test.lint_pr.yml index 8832ba992..7c23ecfd0 100644 --- a/.github/workflows/test.lint_pr.yml +++ b/.github/workflows/test.lint_pr.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest if: ${{ github.actor != 'dependabot[bot]' }} steps: - - uses: amannn/action-semantic-pull-request@v5 + - uses: amannn/action-semantic-pull-request@80c0371c57c5142ed6c844270bba1864bac8a4c6 # v5.5.3 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From a386fe6540fc4facdc507796e7ef6a8ff9f6312c Mon Sep 17 00:00:00 2001 From: mahula Date: Mon, 5 Aug 2024 09:15:17 +0200 Subject: [PATCH 02/12] fix typo --- .github/workflows/check-documentation.yml | 2 +- .github/workflows/deploy-documentation.yml | 2 +- .github/workflows/frontend.test.build.code.yml | 2 +- .github/workflows/frontend.test.build.docker.yml | 2 +- .github/workflows/frontend.test.build.docs.yml | 2 +- .github/workflows/frontend.test.build.storybook.yml | 2 +- .github/workflows/frontend.test.lint.code.yml | 2 +- .github/workflows/frontend.test.unit.code.yml | 2 +- .github/workflows/test-backend.yml | 2 +- .github/workflows/test-webapp.yml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/check-documentation.yml b/.github/workflows/check-documentation.yml index 522c1523f..5f814dc5a 100644 --- a/.github/workflows/check-documentation.yml +++ b/.github/workflows/check-documentation.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for markdown file changes - uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} diff --git a/.github/workflows/deploy-documentation.yml b/.github/workflows/deploy-documentation.yml index 82081ff93..b105d3e17 100644 --- a/.github/workflows/deploy-documentation.yml +++ b/.github/workflows/deploy-documentation.yml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for file changes - uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} diff --git a/.github/workflows/frontend.test.build.code.yml b/.github/workflows/frontend.test.build.code.yml index 135fe216d..d6786455d 100644 --- a/.github/workflows/frontend.test.build.code.yml +++ b/.github/workflows/frontend.test.build.code.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for frontend file changes - uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} diff --git a/.github/workflows/frontend.test.build.docker.yml b/.github/workflows/frontend.test.build.docker.yml index 1f39f0537..ab5c88be2 100644 --- a/.github/workflows/frontend.test.build.docker.yml +++ b/.github/workflows/frontend.test.build.docker.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for frontend file changes - uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} diff --git a/.github/workflows/frontend.test.build.docs.yml b/.github/workflows/frontend.test.build.docs.yml index 67ca9bb2f..0467de524 100644 --- a/.github/workflows/frontend.test.build.docs.yml +++ b/.github/workflows/frontend.test.build.docs.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for frontend file changes - uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} diff --git a/.github/workflows/frontend.test.build.storybook.yml b/.github/workflows/frontend.test.build.storybook.yml index 66cbff3e8..0bb830ddc 100644 --- a/.github/workflows/frontend.test.build.storybook.yml +++ b/.github/workflows/frontend.test.build.storybook.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for frontend file changes - uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} diff --git a/.github/workflows/frontend.test.lint.code.yml b/.github/workflows/frontend.test.lint.code.yml index c4723f6e7..756924f68 100644 --- a/.github/workflows/frontend.test.lint.code.yml +++ b/.github/workflows/frontend.test.lint.code.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for frontend file changes - uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} diff --git a/.github/workflows/frontend.test.unit.code.yml b/.github/workflows/frontend.test.unit.code.yml index 21cdb0fee..53d1ea802 100644 --- a/.github/workflows/frontend.test.unit.code.yml +++ b/.github/workflows/frontend.test.unit.code.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for frontend file changes - uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml index b92cdacac..9c08ccf63 100644 --- a/.github/workflows/test-backend.yml +++ b/.github/workflows/test-backend.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for backend file changes - uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} diff --git a/.github/workflows/test-webapp.yml b/.github/workflows/test-webapp.yml index 2d832315f..955e9efba 100644 --- a/.github/workflows/test-webapp.yml +++ b/.github/workflows/test-webapp.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Check for frontend file changes - uses: dorny/paths-filter@dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: token: ${{ github.token }} From d87958ce48cf34b78fff755825f6c267f0ba861c Mon Sep 17 00:00:00 2001 From: mahula Date: Mon, 5 Aug 2024 09:18:51 +0200 Subject: [PATCH 03/12] fix typo --- .github/workflows/test-backend.yml | 8 ++++---- .github/workflows/test-e2e.yml | 4 ++-- .github/workflows/test-webapp.yml | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml index 9c08ccf63..44631c5e9 100644 --- a/.github/workflows/test-backend.yml +++ b/.github/workflows/test-backend.yml @@ -37,7 +37,7 @@ jobs: - name: Cache docker images id: cache-neo4j - uses: actions/cache/sav@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 + uses: actions/cache@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 with: path: /tmp/neo4j.tar key: ${{ github.run_id }}-backend-neo4j-cache @@ -58,7 +58,7 @@ jobs: - name: Cache docker images id: cache-backend - uses: actions/cache/sav@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 + uses: actions/cache@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 with: path: /tmp/backend.tar key: ${{ github.run_id }}-backend-cache @@ -87,14 +87,14 @@ jobs: uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Restore Neo4J cache - uses: actions/cache/restore@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 + uses: actions/cache@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 with: path: /tmp/neo4j.tar key: ${{ github.run_id }}-backend-neo4j-cache fail-on-cache-miss: true - name: Restore Backend cache - uses: actions/cache/restore@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 + uses: actions/cache@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 with: path: /tmp/backend.tar key: ${{ github.run_id }}-backend-cache diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 734006ef1..40df1ec58 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -37,7 +37,7 @@ jobs: - name: Cache docker images id: cache - uses: actions/cache/sav@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 + uses: actions/cache@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 with: path: | /opt/cucumber-json-formatter @@ -59,7 +59,7 @@ jobs: job: [1, 2, 3, 4, 5, 6, 7, 8] steps: - name: Restore cache - uses: actions/cache/restore@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 + uses: actions/cache@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 id: cache with: path: | diff --git a/.github/workflows/test-webapp.yml b/.github/workflows/test-webapp.yml index 955e9efba..c1afbca95 100644 --- a/.github/workflows/test-webapp.yml +++ b/.github/workflows/test-webapp.yml @@ -50,7 +50,7 @@ jobs: docker save "ocelotsocialnetwork/webapp:test" > /tmp/webapp.tar - name: Cache docker image - uses: actions/cache/sav@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 + uses: actions/cache@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 with: path: /tmp/webapp.tar key: ${{ github.run_id }}-webapp-cache @@ -79,7 +79,7 @@ jobs: uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: Restore webapp cache - uses: actions/cache/restore@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 + uses: actions/cache@40c3b67b2955d93d83b27ed164edd0756bc24049 # v4.0.2 with: path: /tmp/webapp.tar key: ${{ github.run_id }}-webapp-cache From cdc983012c1a7042e47ad1081b6211000643ddc7 Mon Sep 17 00:00:00 2001 From: mahula Date: Mon, 5 Aug 2024 09:34:05 +0200 Subject: [PATCH 04/12] use docker dompose instead of docker-compose in workflow file --- .github/workflows/test-webapp.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-webapp.yml b/.github/workflows/test-webapp.yml index c1afbca95..228b30be1 100644 --- a/.github/workflows/test-webapp.yml +++ b/.github/workflows/test-webapp.yml @@ -93,11 +93,11 @@ jobs: cp frontend/.env.dist frontend/.env cp backend/.env.template backend/.env - - name: backend | docker-compose - run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps webapp + - name: backend | docker compose + run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps webapp - name: webapp | Unit tests incl. coverage check - run: docker-compose exec -T webapp yarn test + run: docker compose exec -T webapp yarn test cleanup: name: Cleanup From f037c44045481436d1b30c5f395b34b910a40782 Mon Sep 17 00:00:00 2001 From: mahula Date: Mon, 5 Aug 2024 09:46:29 +0200 Subject: [PATCH 05/12] use docker dompose instead of docker-compose in workflow files --- .github/workflows/test-backend.yml | 10 +++++----- .github/workflows/test-e2e.yml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml index 44631c5e9..fbc2aab5b 100644 --- a/.github/workflows/test-backend.yml +++ b/.github/workflows/test-backend.yml @@ -111,17 +111,17 @@ jobs: cp frontend/.env.dist frontend/.env cp backend/.env.template backend/.env - - name: backend | docker-compose - run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps neo4j backend + - name: backend | docker compose + run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps neo4j backend - name: backend | Initialize Database - run: docker-compose exec -T backend yarn db:migrate init + run: docker compose exec -T backend yarn db:migrate init - name: backend | Migrate Database Up - run: docker-compose exec -T backend yarn db:migrate up + run: docker compose exec -T backend yarn db:migrate up - name: backend | Unit test incl. coverage check - run: docker-compose exec -T backend yarn test + run: docker compose exec -T backend yarn test cleanup: name: Cleanup diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 40df1ec58..111cc3172 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -70,14 +70,14 @@ jobs: key: ${{ github.run_id }}-e2e-preparation-cache fail-on-cache-miss: true - - name: Boot up test system | docker-compose + - name: Boot up test system | docker compose run: | chmod +x /opt/cucumber-json-formatter sudo ln -fs /opt/cucumber-json-formatter /usr/bin/cucumber-json-formatter docker load < /tmp/images/neo4j.tar docker load < /tmp/images/backend.tar docker load < /tmp/images/webapp.tar - docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps webapp neo4j backend + docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps webapp neo4j backend sleep 90s - name: Full stack tests | run tests From b01539c4c1f1236d4d463c2f18635818bc16472d Mon Sep 17 00:00:00 2001 From: mahula Date: Sat, 24 Aug 2024 14:54:18 +0200 Subject: [PATCH 06/12] replace docker-compose by docker compose in workflow files --- .github/workflows/test-backend.yml | 8 ++++---- .github/workflows/test-e2e.yml | 2 +- .github/workflows/test-webapp.yml | 4 ++-- frontend/.github/workflows/frontend.deploy.docs.yml | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml index 1574b7cee..0690cbc50 100644 --- a/.github/workflows/test-backend.yml +++ b/.github/workflows/test-backend.yml @@ -112,16 +112,16 @@ jobs: cp backend/.env.template backend/.env - name: backend | docker-compose - run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps neo4j backend + run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps neo4j backend - name: backend | Initialize Database - run: docker-compose exec -T backend yarn db:migrate init + run: docker compose exec -T backend yarn db:migrate init - name: backend | Migrate Database Up - run: docker-compose exec -T backend yarn db:migrate up + run: docker compose exec -T backend yarn db:migrate up - name: backend | Unit test incl. coverage check - run: docker-compose exec -T backend yarn test + run: docker compose exec -T backend yarn test cleanup: name: Cleanup diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index fabb2a3f1..ad29c76d4 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -77,7 +77,7 @@ jobs: docker load < /tmp/images/neo4j.tar docker load < /tmp/images/backend.tar docker load < /tmp/images/webapp.tar - docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps webapp neo4j backend + docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps webapp neo4j backend sleep 90s - name: Full stack tests | run tests diff --git a/.github/workflows/test-webapp.yml b/.github/workflows/test-webapp.yml index 2a6593994..e148663a8 100644 --- a/.github/workflows/test-webapp.yml +++ b/.github/workflows/test-webapp.yml @@ -94,10 +94,10 @@ jobs: cp backend/.env.template backend/.env - name: backend | docker-compose - run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps webapp + run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps webapp - name: webapp | Unit tests incl. coverage check - run: docker-compose exec -T webapp yarn test + run: docker compose exec -T webapp yarn test cleanup: name: Cleanup diff --git a/frontend/.github/workflows/frontend.deploy.docs.yml b/frontend/.github/workflows/frontend.deploy.docs.yml index 957e80aba..5041eee14 100644 --- a/frontend/.github/workflows/frontend.deploy.docs.yml +++ b/frontend/.github/workflows/frontend.deploy.docs.yml @@ -8,10 +8,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7 - name: vuepress-deploy - uses: jenkey2011/vuepress-deploy@master + uses: jenkey2011/vuepress-deploy@875651a25c97353b9dcfc78c0c59b7dc09b8dbda # v1.8.1 env: ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} #TARGET_REPO: username/repo From 27777eedaab93a427df4fcd27254aca501ead27c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 29 Aug 2024 13:42:40 +0200 Subject: [PATCH 07/12] Fix backend tests 'valid event input with location name' --- backend/src/schema/resolvers/posts.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/schema/resolvers/posts.spec.ts b/backend/src/schema/resolvers/posts.spec.ts index b816e25aa..10da1c43e 100644 --- a/backend/src/schema/resolvers/posts.spec.ts +++ b/backend/src/schema/resolvers/posts.spec.ts @@ -632,8 +632,8 @@ describe('CreatePost', () => { eventLocationName: 'Leipzig', eventVenue: 'Connewitzer Kreuz', eventLocation: { - lng: 12.374733, - lat: 51.340632, + lng: 12.375101, + lat: 51.34083, }, }, }, @@ -947,8 +947,8 @@ describe('UpdatePost', () => { eventLocationName: 'Leipzig', eventVenue: 'Connewitzer Kreuz', eventLocation: { - lng: 12.374733, - lat: 51.340632, + lng: 12.375101, + lat: 51.34083, }, }, }, From 0691b8eb79605a0f06f9e91c055b663cbcfe34da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 29 Aug 2024 13:48:21 +0200 Subject: [PATCH 08/12] Fix backend test which uses 'newlyCreatedNodesWithLocales' in file 'backend/src/schema/resolvers/users/location.spec.ts' --- backend/src/schema/resolvers/users/location.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/schema/resolvers/users/location.spec.ts b/backend/src/schema/resolvers/users/location.spec.ts index de132c2c7..d4db00b7b 100644 --- a/backend/src/schema/resolvers/users/location.spec.ts +++ b/backend/src/schema/resolvers/users/location.spec.ts @@ -38,8 +38,8 @@ const newlyCreatedNodesWithLocales = [ nameRU: 'Вельцхайм', nameNL: 'Welzheim', namePL: 'Welzheim', - lng: 9.634741, - lat: 48.874924, + lng: 9.634519, + lat: 48.87682, }, state: { id: expect.stringContaining('region'), From e47ea687f9797c9f5cfe48c31e2d3e72fc571166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 29 Aug 2024 16:03:58 +0200 Subject: [PATCH 09/12] Fix maintenance dockerfiles image name --- webapp/Dockerfile.maintenance | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/Dockerfile.maintenance b/webapp/Dockerfile.maintenance index 956c1d1b1..d6cd034e8 100644 --- a/webapp/Dockerfile.maintenance +++ b/webapp/Dockerfile.maintenance @@ -1,7 +1,7 @@ ################################################################################## # BASE ########################################################################### ################################################################################## -FROM 20.12.1-alpine3.19 as base +FROM node:20.12.1-alpine3.19 AS base # ENVs ## DOCKER_WORKDIR would be a classical ARG, but that is not multi layer persistent - shame From 77219363e92eea535559bb3e96fbec526998c4a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 29 Aug 2024 16:09:25 +0200 Subject: [PATCH 10/12] Add 'maintenance' to scopes of '.github/workflows/test.lint_pr.yml' --- .github/workflows/test.lint_pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.lint_pr.yml b/.github/workflows/test.lint_pr.yml index 8832ba992..d80ec7b5a 100644 --- a/.github/workflows/test.lint_pr.yml +++ b/.github/workflows/test.lint_pr.yml @@ -31,6 +31,7 @@ jobs: backend webapp frontend + maintenance database docu docker From 1a2c7abfe8c2d9e3ee68a604d038a9d2ad039437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 29 Aug 2024 16:19:19 +0200 Subject: [PATCH 11/12] Fix warning because of lower case 'as' instead of uppercase 'AS' in dockerfiles --- backend/Dockerfile | 12 ++++++------ deployment/src/docker/backend.Dockerfile | 6 +++--- deployment/src/docker/maintenance.Dockerfile | 8 ++++---- deployment/src/docker/webapp.Dockerfile | 6 +++--- frontend/Dockerfile | 14 +++++++------- neo4j/Dockerfile | 4 ++-- webapp/Dockerfile | 12 ++++++------ webapp/Dockerfile.maintenance | 6 +++--- 8 files changed, 34 insertions(+), 34 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 4508ada30..a7931f31a 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,7 +1,7 @@ ################################################################################## # BASE (Is pushed to DockerHub for rebranding) ################################### ################################################################################## -FROM node:20.12.1-alpine3.19 as base +FROM node:20.12.1-alpine3.19 AS base # ENVs ## DOCKER_WORKDIR would be a classical ARG, but that is not multi layer persistent - shame @@ -48,7 +48,7 @@ WORKDIR ${DOCKER_WORKDIR} ################################################################################## # DEVELOPMENT (Connected to the local environment, to reload on demand) ########## ################################################################################## -FROM base as development +FROM base AS development # We don't need to copy or build anything since we gonna bind to the # local filesystem which will need a rebuild anyway @@ -61,7 +61,7 @@ CMD /bin/sh -c "yarn install && yarn run dev" ################################################################################## # CODE (Does contain all code files and is pushed to DockerHub for rebranding) ### ################################################################################## -FROM base as code +FROM base AS code # copy everything, but do not build. COPY . . @@ -69,7 +69,7 @@ COPY . . ################################################################################## # BUILD (Does contain all files and the compilate and is therefore bloated) ###### ################################################################################## -FROM code as build +FROM code AS build # yarn install RUN yarn install --production=false --frozen-lockfile --non-interactive @@ -79,7 +79,7 @@ RUN /bin/sh -c "yarn run build" ################################################################################## # TEST ########################################################################### ################################################################################## -FROM build as test +FROM build AS test # Run command CMD /bin/sh -c "yarn run dev" @@ -87,7 +87,7 @@ CMD /bin/sh -c "yarn run dev" ################################################################################## # PRODUCTION (Does contain only "binary"- and static-files to reduce image size) # ################################################################################## -FROM base as production +FROM base AS production # Copy "binary"-files from build image COPY --from=build ${DOCKER_WORKDIR}/build ./build diff --git a/deployment/src/docker/backend.Dockerfile b/deployment/src/docker/backend.Dockerfile index a0b6e4ed4..76a091da2 100644 --- a/deployment/src/docker/backend.Dockerfile +++ b/deployment/src/docker/backend.Dockerfile @@ -7,7 +7,7 @@ ARG APP_IMAGE_CODE=${APP_IMAGE}:${APP_IMAGE_TAG_CODE} ################################################################################## # CODE (branded) ################################################################# ################################################################################## -FROM $APP_IMAGE_CODE as code +FROM $APP_IMAGE_CODE AS code ARG CONFIGURATION=example @@ -20,7 +20,7 @@ COPY configurations/${CONFIGURATION}/branding/email/ src/middleware/helpers/emai ################################################################################## # BUILD ########################################################################## ################################################################################## -FROM code as build +FROM code AS build # yarn install RUN yarn install --production=false --frozen-lockfile --non-interactive @@ -30,7 +30,7 @@ RUN yarn run build ################################################################################## # BRANDED (Does contain only "binary"- and static-files to reduce image size) #### ################################################################################## -FROM $APP_IMAGE_BASE as branded +FROM $APP_IMAGE_BASE AS branded # TODO - do all copying with one COPY command to have one layer # Copy "binary"-files from build image diff --git a/deployment/src/docker/maintenance.Dockerfile b/deployment/src/docker/maintenance.Dockerfile index 95501252c..8eefcc067 100644 --- a/deployment/src/docker/maintenance.Dockerfile +++ b/deployment/src/docker/maintenance.Dockerfile @@ -7,7 +7,7 @@ ARG APP_IMAGE_CODE=${APP_IMAGE}:${APP_IMAGE_TAG_CODE} ################################################################################## # CODE (branded) ################################################################# ################################################################################## -FROM $APP_IMAGE_CODE as code +FROM $APP_IMAGE_CODE AS code ARG CONFIGURATION=example @@ -25,7 +25,7 @@ RUN tools/merge-locales.sh ################################################################################## # BUILD ########################################################################## ################################################################################## -FROM code as build +FROM code AS build # yarn install ## unnicely done in $APP_IMAGE_CODE at the moment, see main repo @@ -36,8 +36,8 @@ RUN yarn run generate ################################################################################## # BRANDED ### TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO #### ################################################################################## -# FROM $APP_IMAGE_BASE as branded -FROM nginx:alpine as branded +# FROM $APP_IMAGE_BASE AS branded +FROM nginx:alpine AS branded COPY --from=build ./app/dist/ /usr/share/nginx/html/ RUN rm /etc/nginx/conf.d/default.conf diff --git a/deployment/src/docker/webapp.Dockerfile b/deployment/src/docker/webapp.Dockerfile index d811219c3..54f79a56f 100644 --- a/deployment/src/docker/webapp.Dockerfile +++ b/deployment/src/docker/webapp.Dockerfile @@ -7,7 +7,7 @@ ARG APP_IMAGE_CODE=${APP_IMAGE}:${APP_IMAGE_TAG_CODE} ################################################################################## # CODE (branded) ################################################################# ################################################################################## -FROM $APP_IMAGE_CODE as code +FROM $APP_IMAGE_CODE AS code ARG CONFIGURATION=example @@ -28,7 +28,7 @@ RUN tools/merge-locales.sh ################################################################################## # BUILD ########################################################################## ################################################################################## -FROM code as build +FROM code AS build # yarn install RUN yarn install --production=false --frozen-lockfile --non-interactive @@ -38,7 +38,7 @@ RUN yarn run build ################################################################################## # BRANDED (Does contain only "binary"- and static-files to reduce image size) #### ################################################################################## -FROM $APP_IMAGE_BASE as branded +FROM $APP_IMAGE_BASE AS branded # TODO - do all copying with one COPY command to have one layer # Copy "binary"-files from build image diff --git a/frontend/Dockerfile b/frontend/Dockerfile index c7bbba687..370dfa606 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,4 +1,4 @@ -FROM node:21-alpine3.17 as base +FROM node:21-alpine3.17 AS base # ENVs (available in production aswell, can be overwritten by commandline or env file) ## DOCKER_WORKDIR would be a classical ARG, but that is not multi layer persistent - shame @@ -43,7 +43,7 @@ WORKDIR ${DOCKER_WORKDIR} ################################################################################## # DEVELOPMENT (Connected to the local environment, to reload on demand) ########## ################################################################################## -FROM base as development +FROM base AS development # We don't need to copy or build anything since we gonna bind to the # local filesystem which will need a rebuild anyway @@ -56,7 +56,7 @@ CMD /bin/sh -c "npm install && npm run dev" ################################################################################## # STORYBOOK ###################################################################### ################################################################################## -FROM base as storybook +FROM base AS storybook # We don't need to copy or build anything since we gonna bind to the # local filesystem which will need a rebuild anyway @@ -69,7 +69,7 @@ CMD /bin/sh -c "npm install && npm run storybook" ################################################################################## # DOCUMENTATION ################################################################## ################################################################################## -FROM base as documentation +FROM base AS documentation # We don't need to copy or build anything since we gonna bind to the # local filesystem which will need a rebuild anyway @@ -82,7 +82,7 @@ CMD /bin/sh -c "npm install && npm run docs:dev" ################################################################################## # BUILD (Does contain all files and is therefore bloated) ######################## ################################################################################## -FROM base as build +FROM base AS build # Copy everything COPY . . @@ -94,7 +94,7 @@ RUN npm run build ################################################################################## # TEST ########################################################################### ################################################################################## -#FROM build as test +#FROM build AS test # Install Additional Software # RUN apk add --no-cache bash jq @@ -105,7 +105,7 @@ RUN npm run build ################################################################################## # PRODUCTION (Does contain only "binary"- and static-files to reduce image size) # ################################################################################## -FROM base as production +FROM base AS production # Copy "binary"-files from build image COPY --from=build ${DOCKER_WORKDIR}/build ./build diff --git a/neo4j/Dockerfile b/neo4j/Dockerfile index 89c45ff66..b1d07080e 100644 --- a/neo4j/Dockerfile +++ b/neo4j/Dockerfile @@ -1,7 +1,7 @@ ################################################################################## # COMMUNITY ###################################################################### ################################################################################## -FROM amd64/neo4j:4.4-community as community +FROM amd64/neo4j:4.4-community AS community # ENVs ## We Cannot do `$(date -u +'%Y-%m-%dT%H:%M:%SZ')` here so we use unix timestamp=0 @@ -36,7 +36,7 @@ RUN wget https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/downloa ################################################################################## # ENTERPRISE ##################################################################### ################################################################################## -FROM neo4j:4.4-enterprise as enterprise +FROM neo4j:4.4-enterprise AS enterprise # Install Additional Software ## install: wget, htop (TODO: why do we need htop?) diff --git a/webapp/Dockerfile b/webapp/Dockerfile index c6f58652f..f610713fc 100644 --- a/webapp/Dockerfile +++ b/webapp/Dockerfile @@ -1,7 +1,7 @@ ################################################################################## # BASE (Is pushed to DockerHub for rebranding) ################################### ################################################################################## -FROM node:20.12.1-alpine3.19 as base +FROM node:20.12.1-alpine3.19 AS base # ENVs ## DOCKER_WORKDIR would be a classical ARG, but that is not multi layer persistent - shame @@ -48,7 +48,7 @@ WORKDIR ${DOCKER_WORKDIR} ################################################################################## # DEVELOPMENT (Connected to the local environment, to reload on demand) ########## ################################################################################## -FROM base as development +FROM base AS development # We don't need to copy or build anything since we gonna bind to the # local filesystem which will need a rebuild anyway @@ -61,7 +61,7 @@ CMD /bin/sh -c "yarn install && yarn run dev" ################################################################################## # CODE (Does contain all code files and is pushed to DockerHub for rebranding) ### ################################################################################## -FROM base as code +FROM base AS code # copy everything, but do not build. COPY . . @@ -69,7 +69,7 @@ COPY . . ################################################################################## # BUILD (Does contain all files and the compilate and is therefore bloated) ###### ################################################################################## -FROM code as build +FROM code AS build # yarn install RUN yarn install --production=false --frozen-lockfile --non-interactive @@ -79,7 +79,7 @@ RUN yarn run build ################################################################################## # TEST ########################################################################### ################################################################################## -FROM build as test +FROM build AS test # Run command CMD /bin/sh -c "yarn run dev" @@ -87,7 +87,7 @@ CMD /bin/sh -c "yarn run dev" ################################################################################## # PRODUCTION (Does contain only "binary"- and static-files to reduce image size) # ################################################################################## -FROM base as production +FROM base AS production # TODO - do all copying with one COPY command to have one layer # Copy "binary"-files from build image diff --git a/webapp/Dockerfile.maintenance b/webapp/Dockerfile.maintenance index d6cd034e8..096995dca 100644 --- a/webapp/Dockerfile.maintenance +++ b/webapp/Dockerfile.maintenance @@ -50,7 +50,7 @@ CMD ["yarn", "run", "start"] ################################################################################## # CODE (Does contain all code files and is pushed to DockerHub for rebranding) ### ################################################################################## -FROM base as code +FROM base AS code COPY package.json yarn.lock ./ # yarn install @@ -78,7 +78,7 @@ COPY maintenance/source ./ ################################################################################## # BUILD ### TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO ## ################################################################################## -FROM code as build +FROM code AS build # yarn generate RUN yarn run generate @@ -86,7 +86,7 @@ RUN yarn run generate ################################################################################## # PRODUCTION ### TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO #### ################################################################################## -FROM nginx:alpine as production +FROM nginx:alpine AS production COPY --from=build ./app/dist/ /usr/share/nginx/html/ RUN rm /etc/nginx/conf.d/default.conf From 15bb2d24bf8a4857d99d81ff69a875afb23d9a3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 29 Aug 2024 16:35:26 +0200 Subject: [PATCH 12/12] Fix warnings by removing 'version' from all Docker Compose YAMLs --- deployment/docker-compose.ocelotsocial-branded.yml | 2 -- deployment/docker-compose.yml | 2 +- docker-compose.maintenance.yml | 3 +-- docker-compose.override.yml | 2 -- docker-compose.test.yml | 2 -- docker-compose.yml | 2 -- 6 files changed, 2 insertions(+), 11 deletions(-) diff --git a/deployment/docker-compose.ocelotsocial-branded.yml b/deployment/docker-compose.ocelotsocial-branded.yml index 0c42d6273..b9ea2b434 100644 --- a/deployment/docker-compose.ocelotsocial-branded.yml +++ b/deployment/docker-compose.ocelotsocial-branded.yml @@ -1,6 +1,4 @@ # This docker-compose file is just here for testing -version: "3.4" - services: ######################################################## diff --git a/deployment/docker-compose.yml b/deployment/docker-compose.yml index e66b41f9f..145023f42 100644 --- a/deployment/docker-compose.yml +++ b/deployment/docker-compose.yml @@ -1,6 +1,6 @@ # This docker-compose file is just here for testing -version: "3.4" services: + webapp-base: image: ocelotsocialnetwork/webapp:local-base build: diff --git a/docker-compose.maintenance.yml b/docker-compose.maintenance.yml index b006713ec..1f2a2f5b4 100644 --- a/docker-compose.maintenance.yml +++ b/docker-compose.maintenance.yml @@ -1,8 +1,7 @@ # Todo: !!! This file seems related to our old maintenance worker for MongoDB and has to be refactored in case of using it !!! -version: "3.4" - services: + maintenance-worker: image: ocelotsocialnetwork/develop-maintenance-worker:latest build: diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 1d8dbf966..d99ef9cfb 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: ######################################################## diff --git a/docker-compose.test.yml b/docker-compose.test.yml index fa858f28c..9ee94801d 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: ######################################################## diff --git a/docker-compose.yml b/docker-compose.yml index 55fe8b262..ed69e7f01 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,8 +3,6 @@ # is required to explicitly define if you want an production build: # > docker-compose -f docker-compose.yml up -version: "3.4" - services: ########################################################