Skip to content

Merge pull request #1138 from stratosphereips/develop #3

Merge pull request #1138 from stratosphereips/develop

Merge pull request #1138 from stratosphereips/develop #3

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