-
Notifications
You must be signed in to change notification settings - Fork 22
41 lines (34 loc) · 968 Bytes
/
pr-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
---
name: Pull Request CI
on:
pull_request:
paths-ignore:
- '**.md'
- 'LICENSE'
- '.github/dependabot.yml'
env:
DOCKER_IMAGE_NAME: gofrolist/molecule
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.3.4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.6.0
- name: Build Docker image
uses: docker/build-push-action@v2.7.0
with:
context: .
load: true
tags: ${{ env.DOCKER_IMAGE_NAME }}:test
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Test run Molecule
run: |
docker run --rm ${{ env.DOCKER_IMAGE_NAME }}:test molecule --version
- name: Run Snyk to check Docker image for vulnerabilities
uses: snyk/actions/docker@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: ${{ env.DOCKER_IMAGE_NAME }}:test