Skip to content

docs: update examples #196

docs: update examples

docs: update examples #196

Workflow file for this run

name: Monica's docker
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened]
release:
types: [created]
env:
bashbrew-version: 0.1.12
jobs:
build:
runs-on: ubuntu-latest
name: Build ${{ matrix.release }}-${{ matrix.variant }} (${{ matrix.arch }})
strategy:
fail-fast: false
matrix:
variant: [apache, fpm, fpm-alpine]
arch: [amd64, i386]
release: [4, 5]
include:
- release: 4
php-version: 8.2
- release: 5
php-version: 8.3
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
# repository: docker-library/official-images
repository: asbiin/official-images
path: official-images
ref: monica-tests
- name: Fix image
if: matrix.arch == 'i386'
run: |
sed -i -e 's/FROM php/FROM i386\/php/g' "${{ matrix.release }}/${{ matrix.variant }}/Dockerfile"
- name: Update base image
run: |
docker pull ${{ env.prefix }}php:${{ matrix.php-version }}-${{ matrix.variant }}
env:
prefix: ${{ (matrix.arch == 'i386') && 'i386/' || '' }}
- name: Build image ${{ matrix.release }}-${{ matrix.variant }} ${{ matrix.arch }}
run: |
docker build ${{ matrix.release }}/${{ matrix.variant }} -t monica:${{ matrix.release }}-${{ matrix.variant }}
docker images
- name: Test image ${{ matrix.release }}-${{ matrix.variant }} ${{ matrix.arch }}
if: matrix.arch != 'i386' || matrix.variant != 'apache'
run: |
official-images/test/run.sh monica:${{ matrix.release }}-${{ matrix.variant }}
- name: Publish package
if: github.ref == 'refs/heads/main' && matrix.arch != 'i386'
run: |
echo "$password" | docker login ghcr.io -u $username --password-stdin
docker tag monica:${{ matrix.release }}-${{ matrix.variant }} ghcr.io/monicahq/monica-dev:${{ matrix.release }}-${{ matrix.variant }}
docker push ghcr.io/monicahq/monica-dev:${{ matrix.release }}-${{ matrix.variant }}
env:
username: ${{ secrets.CR_USER }}
password: ${{ secrets.CR_PAT }}
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test update script
run: |
hash_before=$(git write-tree)
./update.sh
bash -c "[[ $hash_before = $(git add -A && git write-tree) ]]"
- name: Install bashbrew
run: |
curl -fsSL -o bashbrew https://github.com/docker-library/bashbrew/releases/download/v${{ env.bashbrew-version }}/bashbrew-amd64
chmod +x "bashbrew"
- name: Run stackbrew
run: |
./generate-stackbrew-library.sh