-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (55 loc) · 1.61 KB
/
dev_build.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
62
name: dev-build
on:
workflow_run:
workflows: ["tests"]
branches: [main]
types:
- completed
jobs:
push_dev_images_to_dockerhub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:latest
platforms: linux/amd64,linux/arm64
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Cache
uses: actions/cache@v4
id: cache
with:
path: |
var-cache-pip
var-cache-apt
var-lib-apt
key: ${{ runner.os }}-cache-${{ hashFiles('docker/Dockerfile') }}
- name: Inject cache into docker
uses: reproducible-containers/buildkit-cache-dance@v3.1.2
with:
cache-map: |
{
"var-cache-pip": "/var/cache/pip",
"var-cache-apt": "/var/cache/apt",
"var-lib-apt": "/var/lib/apt"
}
skip-extraction: ${{ steps.cache.outputs.cache-hit }}
- name: Build and push ogion image
uses: docker/build-push-action@v6
with:
file: docker/Dockerfile
context: .
target: build
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
tags: rafsaf/ogion:dev
platforms: linux/amd64,linux/arm64