-
Notifications
You must be signed in to change notification settings - Fork 296
82 lines (68 loc) · 2.03 KB
/
docker.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Github Workflow to build container image
#
# SPDX-FileCopyrightText: 2021 Sebastian Waldbauer
# SPDX-License-Identifier: AGPL-3.0-or-later
#
name: "Build and upload docker image"
on:
push:
branches: ['develop']
paths-ignore:
- '.github/**'
jobs:
docker:
name: Building Docker image
runs-on: ubuntu-latest
steps:
- name: Check if environment is ACT
run: sudo chown runner:docker /var/run/docker.sock
if: ${{ env.ACT }}
- name: Checkout IntelMQ-Docker
uses: actions/checkout@v3
with:
ref: 'main'
repository: certat/intelmq-docker
path: ./work
- name: Checkout IntelMQ-Manager
uses: actions/checkout@v3
with:
ref: 'develop'
repository: certtools/intelmq-manager
path: ./work/intelmq-manager
- name: Checkout IntelMQ-API
uses: actions/checkout@v3
with:
ref: 'develop'
repository: certtools/intelmq-api
path: ./work/intelmq-api
- name: Checkout IntelMQ
uses: actions/checkout@v3
with:
ref: 'develop'
path: ./work/intelmq
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
if: github.repository == 'certtools/intelmq' && !${{ env.ACT }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Install python build requirements
run: |
pip3 install mako
- name: Build
run: |
cd work
./build.sh
- name: Test
run: |
cd work
./test.sh
- name: Publish develop version to dockerhub
if: github.repository == 'certtools/intelmq' && !${{ env.ACT }}
run: |
docker tag intelmq-full:latest certat/intelmq-full:develop
docker push certat/intelmq-full:develop