-
Notifications
You must be signed in to change notification settings - Fork 54
65 lines (64 loc) · 1.82 KB
/
preview.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
64
65
# +-----------------------------------------------+
# | WARNING: This file is generated, do not edit! |
# | Edit _templates/distribution-channel.yml.erb instead. |
# +-----------------------------------------------+
name: Build and push images (preview)
on:
push:
branches:
- "**"
paths:
- "**/*"
- "!README.md"
- "!build.rb"
schedule:
# As well as running when we make changes we should run at least
# every week in order to pick up new parent images and new versions of Snyk
- cron: "0 0 * * 0"
workflow_dispatch:
repository_dispatch:
types: [build_and_push_images]
jobs:
build:
runs-on: ubuntu-latest
env:
CLI_VERSION: ${{ github.event.client_payload.version || 'preview' }}
strategy:
fail-fast: false
matrix:
base:
- clojure
tag:
- clojure-preview
target:
- linux
include:
- base: ubuntu
tag: linux-preview
target: linux
- base: alpine
tag: alpine-preview
target: alpine
steps:
- uses: actions/checkout@v3
- uses: docker/build-push-action@v1
env:
DOCKER_BUILDKIT: "1"
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
add_git_labels: true
target: ${{ matrix.target }}
repository: snyk/snyk
tags: ${{ matrix.tag }}
build_args: IMAGE=${{ matrix.base }},TAG=${{ matrix.tag }},CLI_VERSION=${{ env.CLI_VERSION }}
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update docker hub readme
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: snyk/snyk