Skip to content
name: Build Base Image
concurrency:
group: build-base-${{ github.ref }}-1
cancel-in-progress: true
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-base
on:
push:
paths:
- 'docker/apache/Dockerfile.base'
- '.github/workflows/build-base-image.yaml'
workflow_dispatch:
jobs:
docker-build:
runs-on: ubuntu-latest
environment:
name: test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up swap
run: |
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
free -h # Vérifier que le swap est actif
- name: Increase memory for Docker
run: |
sudo sysctl -w vm.max_map_count=262144
sudo sysctl -w fs.file-max=1048576
ulimit -n 1048576
ulimit -u 1048576
- name: Build base image
uses: ./.github/actions/build-docker-image
with:
registry_url: ${{ env.REGISTRY }}
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.GITHUB_TOKEN }}
docker_image: ${{ env.IMAGE_NAME }}
docker_file: "base"