-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (52 loc) · 1.43 KB
/
containers.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
63
name: containers
# tests whether container
on:
push:
branches:
- main
- master
tags:
- '*'
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: docker meta
id: docker_meta
uses: crazy-max/[email protected]
with:
images: ${{ inputs.image }}
tags: |
type=raw,value=sha-${{ github.sha }}
- name: set up docker buildx
uses: docker/setup-buildx-action@v3
- name: cache docker layers
uses: actions/[email protected]
env:
cache-name: cache-docker-layers
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx
restore-keys: |
${{ runner.os }}-buildx
- name: build
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/dserver_devel/Dockerfile
platforms: linux/amd64
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
outputs: type=docker, dest=/tmp/image.tar
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: image digest
run: echo ${{ steps.docker_build.outputs.digest }}