Skip to content

build SF 6.4 and 7.0 images #13

build SF 6.4 and 7.0 images

build SF 6.4 and 7.0 images #13

Workflow file for this run

name: "Build"
on:
push:
#branches:
# - main
paths:
- Dockerfile
- .docker/**
- .github/workflows/build.yaml
permissions:
contents: 'read'
id-token: 'write'
jobs:
packaging:
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2']
composer: ['2']
symfony: ['6.4']
latest: [false]
include:
- php: 8.1
symfony: 7.0
composer: 2
latest: false
- php: 8.2
symfony: 7.0
composer: 2
latest: true
name: "[Package] SF v${{ matrix.symfony }} PHP ${{ matrix.php }}"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: 'actions/checkout@v3'
- name: Login to GitHub Container Registry
uses: 'docker/login-action@v1'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_REPOSITORY_TOKEN }}
- name: Process builder
shell: bash
run: |
echo "build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> $GITHUB_ENV
echo "image_tag=v${{ matrix.symfony }}-php${{ matrix.php }}-alpine" >> $GITHUB_ENV
- name: Set up Depot CLI
uses: 'depot/setup-action@v1'
- name: Build and Push Package
uses: 'depot/build-push-action@v1'
with:
project: ${{ secrets.DEPOT_PROJECT_ID }}
token: ${{ secrets.DEPOT_PROJECT_TOKEN }}
provenance: false
sbom: false
push: true
context: .
tags: |
ghcr.io/devgine/symfony-golden:${{ env.image_tag }}
${{ matrix.latest && 'ghcr.io/devgine/symfony-golden:latest' || ''}}
build-args: |
VCS_REF=${{ github.sha }}
BUILD_DATE=${{ env.build_date }}
BUILD_VERSION=${{ env.image_tag }}
SYMFONY_VERSION=${{ matrix.symfony }}
PHP_VERSION=${{ matrix.php }}
COMPOSER_VERSION=${{ matrix.composer }}
IMAGE_TAG=ghcr.io/devgine/symfony-golden:${{ env.image_tag }}
run:
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2']
composer: ['2']
symfony: ['6.4', '7.0']
needs: packaging
runs-on: ubuntu-latest
name: "[Run] SF v${{ matrix.symfony }} PHP ${{ matrix.php }}"
container:
image: ghcr.io/devgine/symfony-golden:v${{ matrix.symfony }}-php${{ matrix.php }}-alpine
steps:
- name: OS release
run: cat /etc/os-release
- name: Composer version
run: composer --version
- name: PHP version
run: php --version
- name: Symfony version
working-directory: /var/www/symfony
run: php bin/console -V