Skip to content

Update packages.yml #34

Update packages.yml

Update packages.yml #34

Workflow file for this run

name: Build and publish packages
on:
push:
branches:
- main
env:
IMAGE: lorisleiva/laravel-docker
jobs:
docker:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- tag: "latest"
php: "8.3"
- tag: "stable"
php: "8.2"
- tag: "8.3"
php: "8.3"
- tag: "8.2"
php: "8.2"
- tag: "8.1"
php: "8.1"
steps:
- uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
push: true
context: ${{ matrix.php }}
tags: |
ghcr.io/${{ env.IMAGE }}:${{ matrix.tag }}
${{ env.IMAGE }}:${{ matrix.tag }}
cache-from: type=registry,ref=ghcr.io/${{ env.IMAGE }}:${{ matrix.tag }}
cache-to: type=inline