-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
36 lines (26 loc) · 946 Bytes
/
Dockerfile
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
# ==============================
# > BUILD AND GENERATE
# ==============================
FROM algorand-generator as generator
# ... generator will build its jar file here and run the SDK repo's generation script ...
# ==============================
# > PER-SDK SECTION (FORMAT)
# ==============================
# Use any base image here
FROM node:latest as formatter
# Copy files from previous build stage
COPY --from=generator /repo /repo
WORKDIR /repo
# Now you can install dependencies as needed
RUN npm install
# And then use any script you'd like here to format code
RUN make format
# ==============================
# > PUBLISH
# ==============================
FROM generator as publisher
# Copy work directory from previous stage to the /repo directory
COPY --from=formatter /repo /repo
# This line is implicitly run by default, but I included it for context:
# -> It will create a new branch and open a PR
CMD /scripts/publish.sh