Skip to content

Nightly Docker Images Build #101

Nightly Docker Images Build

Nightly Docker Images Build #101

name: Nightly Docker Images Build
on:
workflow_dispatch:
workflow_call:
permissions:
packages: write
contents: read
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
matrix:
image:
- name: database
dockerfile: Dockerfile.database
- name: server
dockerfile: Dockerfile.server
- name: worker
dockerfile: Dockerfile.worker
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12.7'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install hatchling
- name: Build package
run: |
python -m hatchling build
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build ${{ matrix.image.name }} Image
uses: docker/build-push-action@v4
with:
context: ./
file: ./${{ matrix.image.dockerfile }}
push: true
tags: ghcr.io/h3xitsec/h3xrecon/${{ matrix.image.name }}:nightly
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64