-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (49 loc) · 1.77 KB
/
build.yml
File metadata and controls
55 lines (49 loc) · 1.77 KB
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
name: Build binaries and docker images
on:
push:
branches:
- main
tags: ["*"]
workflow_dispatch:
jobs:
build:
runs-on: self-hosted
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push compiler docker image
uses: docker/build-push-action@v6
with:
push: true
context: "{{defaultContext}}:packagecompiler"
file: Dockerfile
tags: danlooo/julia_package_compiler_dev:latest
cache-from: type=registry,ref=danlooo/julia_package_compiler_dev:cache
cache-to: type=registry,ref=danlooo/julia_package_compiler_dev:cache,mode=max
- name: Run compiler docker container
run: >
sudo chown -R $USER:$USER . &&
docker pull danlooo/julia_package_compiler_dev:latest &&
docker run -v $PWD:/work danlooo/julia_package_compiler_dev:latest /work &&
sudo chown -R $USER:$USER .
- name: Build and push binary docker image
uses: docker/build-push-action@v6
with:
push: true
context: .
file: Dockerfile
tags: danlooo/rqa_deforestation:latest, danlooo/rqa_deforestation:${{ github.sha }}
cache-from: type=registry,ref=danlooo/julia_package_compiler_dev:cache
cache-to: type=registry,ref=danlooo/julia_package_compiler_dev:cache,mode=max
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: binaries
path: packagecompiler/app