Overleaf Development Image #37
This file contains hidden or 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
| name: Overleaf Development Image | |
| on: | |
| workflow_dispatch: | |
| env: | |
| GHCR_REGISTRY: ghcr.io | |
| jobs: | |
| build-image: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| image-name: | |
| [ | |
| web, | |
| webpack, | |
| real-time, | |
| project-history, | |
| notifications, | |
| history-v1, | |
| filestore, | |
| document-updater, | |
| docstore, | |
| contacts, | |
| chat, | |
| clsi, | |
| spelling, | |
| references, | |
| linked-url-proxy | |
| ] | |
| steps: | |
| - name: "Checkout Internal Overleaf Action" | |
| uses: actions/checkout@main | |
| with: | |
| repository: yu-i-i/overleaf-cep | |
| ref: ext-ce | |
| - name: "Check eslint-plugin present" | |
| run: | | |
| if [ ! -d "./libraries/eslint-plugin" ]; then | |
| echo "eslint-plugin-overleaf not found, installing..." | |
| git clone https://github.com/overleaf/overleaf.git ../overleaf-temp | |
| cp -r ../overleaf-temp/libraries/eslint-plugin ./libraries/eslint-plugin | |
| rm -rf ../overleaf-temp | |
| else | |
| echo "eslint-plugin-overleaf found." | |
| fi | |
| - name: "Login to GitHub Container Registry" | |
| uses: docker/login-action@v3.0.0 | |
| with: | |
| registry: ${{env.GHCR_REGISTRY}} | |
| username: ${{github.actor}} | |
| password: ${{secrets.GITHUB_TOKEN}} | |
| - name: "Clone Overleaf And Build" | |
| run: | | |
| cd ./develop/ | |
| bin/build ${{matrix.image-name}} | |
| docker tag develop-${{matrix.image-name}}:latest ${{env.GHCR_REGISTRY}}/ayaka-notes/overleaf/dev/${{matrix.image-name}}:latest | |
| docker push ${{env.GHCR_REGISTRY}}/ayaka-notes/overleaf/dev/${{matrix.image-name}}:latest | |
| clean-image: | |
| runs-on: ubuntu-latest | |
| needs: build-image | |
| steps: | |
| - name: Delete 'untaged' containers | |
| uses: snok/container-retention-policy@v2 | |
| with: | |
| image-names: overleaf/dev/* | |
| cut-off: 1 min ago UTC | |
| account-type: org | |
| org-name: ayaka-notes | |
| untagged-only: true | |
| token: ${{ secrets.ORGTOKEN }} |