Skip to content

Build Docker

Build Docker #275

Workflow file for this run

name: Build Docker
on:
workflow_dispatch:
push:
branches: [main]
schedule:
- cron: '0 5 * * *'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
php: [ 8.2, 8.1, 8.0, 8.0.28 ]
name: P${{ matrix.php }} - ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
name: Check out code
- name: Set output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Check output
env:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
run: |
echo $RELEASE_VERSION
echo ${{ steps.vars.outputs.tag }}
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build & push Docker image
with:
image: lightszentip/ci-docker-php-node
tag: php${{ matrix.php }}
registry: docker.io
dockerfile: Dockerfile
buildArgs: PHP_VERSION=${{ matrix.php }}-cli
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}