Skip to content

Commit 0494cce

Browse files
authored
Add compiled packages to docker (#68)
* Add Dockerfile * Refactor Dockerfile, clarify build context * Update build workflow
1 parent 8a2336b commit 0494cce

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed
Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
name: PackageCompiler
1+
name: Build binaries and docker images
22
on:
3-
schedule:
4-
- cron: "0 3 * * *"
3+
push:
4+
branches:
5+
- main
6+
tags: ["*"]
57
workflow_dispatch:
68
jobs:
79
build:
@@ -19,7 +21,7 @@ jobs:
1921
username: ${{ vars.DOCKER_USERNAME }}
2022
password: ${{ secrets.DOCKER_PASSWORD }}
2123

22-
- name: Build and push Docker image
24+
- name: Build and push compiler docker image
2325
uses: docker/build-push-action@v2
2426
with:
2527
push: true
@@ -29,13 +31,23 @@ jobs:
2931
cache-from: type=registry,ref=danlooo/julia_package_compiler_dev:cache
3032
cache-to: type=registry,ref=danlooo/julia_package_compiler_dev:cache,mode=max
3133

32-
- name: Run Docker container
34+
- name: Run compiler docker container
3335
run: >
3436
sudo chown -R $USER:$USER . &&
3537
docker pull danlooo/julia_package_compiler_dev:latest &&
3638
docker run -v $PWD:/work danlooo/julia_package_compiler_dev:latest /work &&
3739
sudo chown -R $USER:$USER .
3840
41+
- name: Build and push binary docker image
42+
uses: docker/build-push-action@v2
43+
with:
44+
push: true
45+
context: "{{defaultContext}}"
46+
file: Dockerfile
47+
tags: danlooo/rqa_deforestation:latest, danlooo/rqa_deforestation:${{ github.sha }}
48+
cache-from: type=registry,ref=danlooo/julia_package_compiler_dev:cache
49+
cache-to: type=registry,ref=danlooo/julia_package_compiler_dev:cache,mode=max
50+
3951
- name: Upload binaries
4052
uses: actions/upload-artifact@v4
4153
with:

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM debian:bookworm-slim
2+
WORKDIR /work
3+
COPY packagecompiler/app/bin /usr/bin
4+
COPY packagecompiler/app/lib /usr/lib
5+
ENTRYPOINT ["RQADeforestation"]

0 commit comments

Comments
 (0)