-
Notifications
You must be signed in to change notification settings - Fork 183
65 lines (56 loc) · 1.81 KB
/
publish-slips-images.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
name: CI-production-publishing-slips-images
on:
push:
branches:
- 'master'
- '!develop'
jobs:
publish_slips_docker_image:
# runs the tests in a docker(built by this job) on stop of a GH VM
runs-on: ubuntu-20.04
# 2 hours timeout
timeout-minutes: 7200
steps:
- name: Get slips version
run: |
VER=$(curl -s https://raw.githubusercontent.com/stratosphereips/StratosphereLinuxIPS/develop/VERSION)
echo "SLIPS_VERSION=$VER" >> $GITHUB_ENV
# clone slips and checkout branch
# By default it checks out only one commit
- uses: actions/checkout@v4
with:
ref: 'master'
# Fetch all history for all tags and branches
fetch-depth: ''
submodules: true
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: stratosphereips
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
# Set up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push the main Slips image
id: docker_build_slips
uses: docker/build-push-action@v6
with:
allow: network.host
context: ./
file: ./docker/Dockerfile
tags: |
stratosphereips/slips:latest
stratosphereips/slips:${{ env.SLIPS_VERSION }}
push: true
- name: Build and push the light Slips image
id: docker_build_light_slips
uses: docker/build-push-action@v6
with:
allow: network.host
context: ./
file: ./docker/light/Dockerfile
tags: |
stratosphereips/slips_light:latest
stratosphereips/slips_light:${{ env.SLIPS_VERSION }}
push: true