Skip to content

Workflow file for this run

name: Build mediawiki Docker image
on:
- push
- pull_request
jobs:
deploy:
runs-on: ubuntu-latest
if: github.repository == 'hacklabto/web-infra'
steps:
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- uses: docker/build-push-action@v2
with:
# https://github.com/docker/build-push-action/issues/378
context: docker/mediawiki/
file: docker/mediawiki/Dockerfile
push: true
tags: |
ghcr.io/hacklabto/mediawiki:${{ github.sha }}
cache-from: type=registry,ref=ghcr.io/hacklabto/mediawiki:${{ env.BRANCH_NAME }}
cache-to: type=inline