Skip to content

docker-ci

docker-ci #708

Workflow file for this run

name: docker-ci
on:
# enable manual trigger
workflow_dispatch:
schedule:
# every 24 hours at midnight
- cron: '0 0 * * *'
push:
branches:
- main
paths:
- '.github/workflows/docker-ci.yml'
- 'docker/**'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
env:
DOCKER_REPOSITORY: hckops
jobs:
docker:
name: Docker
runs-on: ubuntu-latest
timeout-minutes: 15
# parallel jobs
strategy:
matrix:
images:
########## boxes ##########
- path: box
name: alpine-core
nightly: true
- path: box
name: alpine-openvpn
nightly: true
- path: box
name: alpine-openvpn-privileged
nightly: true
- path: box
name: alpine-tty
nightly: true
- path: box
name: arch-tty
# arm base image not available
platforms: 'linux/amd64'
nightly: true
- path: box
name: metasploit
nightly: true
- path: box
name: parrot-core
nightly: true
- path: box
name: ubuntu-tty
nightly: true
# exclude from nightly schedule
- path: ctf
name: htb-postman
########## tasks ##########
- path: task
name: rsactftool
platforms: 'linux/amd64'
nightly: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Docker CI
if: ${{ !matrix.images.skip && (github.event_name != 'schedule' || (github.event_name == 'schedule' && matrix.images.nightly)) }}
uses: hckops/actions/[email protected]
with:
DOCKER_CONTEXT: ./docker/${{ matrix.images.path }}/${{ matrix.images.name }}
# use override or fallback to default
DOCKER_PLATFORMS: ${{ matrix.images.platforms || 'linux/amd64,linux/arm64' }}
DOCKER_IMAGE_NAME: ${{ matrix.images.name }}
DOCKER_REPOSITORY: ${{ env.DOCKER_REPOSITORY }}
DOCKER_DEFAULT_TAG: 'latest'
# repository secrets
SECRET_DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
SECRET_DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
SECRET_DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}