Skip to content

Build and Push Container #29

Build and Push Container

Build and Push Container #29

name: Build and Push Container
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU (pour multi-arch, optionnel)
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx (optionnel)
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set repository owner lowercase
id: repo_owner
run: echo "owner=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: ./base-container
push: true
tags: ghcr.io/${{ steps.repo_owner.outputs.owner }}/archimedeos-base:latest
- name: Build and push BlueTeam image
uses: docker/build-push-action@v5
with:
context: ./blueteam-container
push: true
tags: ghcr.io/${{ steps.repo_owner.outputs.owner }}/archimedeos-blueteam:latest
- name: Build and push RedTeam image
uses: docker/build-push-action@v5
with:
context: ./redteam-container
push: true
tags: ghcr.io/${{ steps.repo_owner.outputs.owner }}/archimedeos-redteam:latest