-
Notifications
You must be signed in to change notification settings - Fork 6
61 lines (59 loc) · 1.75 KB
/
develop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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
]
steps:
- name: "Check out code"
uses: actions/checkout@main
- name: "Login to GitHub Container Registry"
uses: docker/[email protected]
with:
registry: ${{env.GHCR_REGISTRY}}
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: "Clone Overleaf And Build"
run: |
git clone https://github.com/overleaf/overleaf ./overleaf
cp ./dev-patches/web-dockerfile/Dockerfile ./overleaf/services/web/Dockerfile
cd ./overleaf/develop/
bin/build ${{matrix.image-name}}
- name: "Push Image"
run: |
docker tag develop-${{matrix.image-name}} ${{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 }}