forked from falcosecurity/libs
-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (99 loc) · 3.71 KB
/
ci.yaml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: ci
on:
push:
branches:
- '*'
workflow_dispatch:
jobs:
docker-libs:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ github.repository }}/libs
tags: |
type=sha,prefix=
type=sha,format=long,prefix=
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set build args
id: args
shell: bash
run: |
echo "FALCOSECURITY_LIBS_VERSION=${{ github.sha }}" >> $GITHUB_ENV
echo "FALCOSECURITY_LIBS_DRIVER_VERSION=${{ github.sha }}" >> $GITHUB_ENV
echo "FALCOSECURITY_LIBS_CHECKSUM=$(wget -qO- https://github.com/falcosecurity/libs/archive/${{ github.sha }}.tar.gz | sha256sum | cut -d " " -f 1)" >> $GITHUB_ENV
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
tags: "${{ steps.meta.outputs.tags }}"
push: true
file: "docker/libs/Dockerfile"
build-args: |
FALCOSECURITY_LIBS_VERSION=${{ env.FALCOSECURITY_LIBS_VERSION }}
FALCOSECURITY_LIBS_DRIVER_VERSION=${{ env.FALCOSECURITY_LIBS_DRIVER_VERSION }}
FALCOSECURITY_LIBS_CHECKSUM=${{ env.FALCOSECURITY_LIBS_CHECKSUM }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
docker-runtime:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ github.repository }}/runtime
tags: |
type=sha,prefix=
type=sha,format=long,prefix=
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set build args
id: args
shell: bash
run: |
echo "FALCOSECURITY_LIBS_VERSION=${{ github.sha }}" >> $GITHUB_ENV
echo "FALCOSECURITY_LIBS_DRIVER_VERSION=${{ github.sha }}" >> $GITHUB_ENV
echo "FALCOSECURITY_LIBS_CHECKSUM=$(wget -qO- https://github.com/falcosecurity/libs/archive/${{ github.sha }}.tar.gz | sha256sum | cut -d " " -f 1)" >> $GITHUB_ENV
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
tags: "${{ steps.meta.outputs.tags }}"
push: true
file: "docker/driver-loader/Dockerfile"
build-args: |
FALCOSECURITY_LIBS_VERSION=${{ env.FALCOSECURITY_LIBS_VERSION }}
FALCOSECURITY_LIBS_DRIVER_VERSION=${{ env.FALCOSECURITY_LIBS_DRIVER_VERSION }}
FALCOSECURITY_LIBS_CHECKSUM=${{ env.FALCOSECURITY_LIBS_CHECKSUM }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}