forked from LavaMoat/LavaMoat
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.57 KB
/
docker.yml
File metadata and controls
43 lines (41 loc) · 1.57 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
name: CI-Docker
on: [push, pull_request]
permissions:
contents: read
jobs:
test-dev-alpine:
name: test-dev-alpine
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3
with:
driver: docker-container # for advanced features like build caching when running Act locally
driver-opts: |
image=docker.io/moby/buildkit:master@sha256:c8029e1a3e837c6e3b3c7dc97114385e902a2a321306bd6aa5c86da3ab6414db
- name: Build OCI image
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6
with:
# Use local cache dir when running using Act; gha cache otherwise
cache-from: type=${{ env.ACT && 'local,src=/tmp/act-cache' || 'gha' }}
cache-to: type=${{ env.ACT && 'local,dest=/tmp/act-cache' || 'gha' }},mode=max
context: .
file: ./Dockerfile
load: true
push: false
tags: 'dev:latest'
- name: rebuild
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3
with:
image: 'dev:latest'
run: |
npm run setup && npm run rebuild
- name: test
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3
with:
options: '-e DOCKER_CI=1'
image: 'dev:latest'
run: |
npm run test:prep && npm run test