File tree Expand file tree Collapse file tree 2 files changed +52
-0
lines changed
ci/dockerfiles/autoscaler-devbox Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1818 IMAGE_NAME : ${{ github.repository }}
1919
2020jobs :
21+ build-and-push-devbox-image :
22+ runs-on : ubuntu-latest
23+ permissions :
24+ contents : read
25+ packages : write
26+ name : Build and Push app-autoscaler-release-devbox
27+ steps :
28+ - name : Checkout repository
29+ uses : actions/checkout@v4
30+
31+ - name : Log in to the Container registry
32+ uses : docker/login-action@v3
33+ with :
34+ registry : ${{ env.REGISTRY }}
35+ username : ${{ github.actor }}
36+ password : ${{ secrets.GITHUB_TOKEN }}
37+
38+ - name : Extract metadata (tags, labels) for Docker
39+ id : meta
40+ uses : docker/metadata-action@v5
41+ with :
42+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-devbox
43+
44+ - name : Build and push
45+ id : build-and-push
46+ uses : docker/build-push-action@v5
47+ with :
48+ context : .
49+ file : ci/dockerfiles/autoscaler-devbox/Dockerfile
50+ push : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
51+ tags : ${{ steps.meta.outputs.tags }}
52+ labels : ${{ steps.meta.outputs.labels }}
53+ cache-from : type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-devbox:main
54+
2155 build-and-push-image :
2256 runs-on : ubuntu-latest
2357 permissions :
Original file line number Diff line number Diff line change 1+ FROM jetpackio/devbox@sha256:430afb5a5c9b4ec9f56776e8fcb82fe67fa5fabba3ba67ebb1c13b17d0e8de8d
2+
3+
4+ # Installing your devbox project
5+ WORKDIR /code
6+ USER root:root
7+ RUN mkdir -p /code && chown "${DEVBOX_USER}:${DEVBOX_USER}" /code
8+ USER ${DEVBOX_USER}:${DEVBOX_USER}
9+ COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.json devbox.json
10+ COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.lock devbox.lock
11+
12+
13+ # Step 6: Copying local flakes directories
14+ COPY local-flake local-flake
15+
16+ RUN devbox run -- echo "Installed Packages."
17+
18+ CMD ["devbox" , "shell" ]
You can’t perform that action at this time.
0 commit comments