publish the images on push to this branch (for testing only) #8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI-production-publishing-slips-images | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| - 'alya/immune/make_dockerfile_compatible_with_rpi' | |
| - '!develop' | |
| jobs: | |
| setup: | |
| runs-on: ubuntu-20.04 | |
| # 2 hours timeout | |
| timeout-minutes: 7200 | |
| outputs: | |
| slips_version: ${{ steps.get_version.outputs.slips_version }} | |
| steps: | |
| - name: Get slips version | |
| id: get_version | |
| run: | | |
| VER=$(curl -s https://raw.githubusercontent.com/stratosphereips/StratosphereLinuxIPS/develop/VERSION) | |
| echo "slips_version=$VER" >> $GITHUB_OUTPUT | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: 'master' | |
| 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 | |
| publish_main_image: | |
| needs: setup | |
| runs-on: ubuntu-20.04 | |
| steps: | |
| # 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 are needed for local and global p2p | |
| submodules: true | |
| - name: Build and push the main Slips image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| allow: network.host | |
| context: ./ | |
| file: ./docker/Dockerfile | |
| tags: | | |
| stratosphereips/for_testingg_slips:latest | |
| stratosphereips/for_testingg_slips:${{ needs.setup.outputs.slips_version }} | |
| push: true | |
| publish_light_image: | |
| needs: setup | |
| runs-on: ubuntu-20.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: 'master' | |
| fetch-depth: '' | |
| submodules: true | |
| - name: Build and push the light Slips image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| allow: network.host | |
| context: ./ | |
| file: ./docker/light/Dockerfile | |
| tags: | | |
| stratosphereips/for_testingg_slips_light:latest | |
| stratosphereips/for_testingg_slips_light:${{ needs.setup.outputs.slips_version }} | |
| push: true |