docker-ci #270
This file contains 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: 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: 30 | |
# parallel jobs | |
strategy: | |
matrix: | |
images: | |
- path: . | |
name: alpine-openvpn | |
nightly: true | |
- path: . | |
name: alpine-tty | |
nightly: true | |
- path: . | |
name: arch-tty | |
nightly: true | |
- path: . | |
name: metasploit | |
nightly: true | |
- path: . | |
name: parrot-core | |
nightly: true | |
- path: . | |
name: ubuntu-tty | |
nightly: true | |
# exclude from nightly schedule | |
- path: ctf | |
name: htb-postman | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Docker CI | |
if: ${{ 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 }} | |
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 }} |