Move IMAGE value to the matrix

master
Carlos Gomes 2022-10-04 09:54:00 +02:00
rodzic 790612be82
commit 6b31603d32
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 870909DFEF7C5FB9
1 zmienionych plików z 4 dodań i 5 usunięć

Wyświetl plik

@ -9,22 +9,21 @@ on:
jobs: jobs:
build_latest: build_latest:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
IMAGE: carlosalgms/composer-and-node-ci
strategy: strategy:
matrix: matrix:
tag: [php8, php7.1] tag: [php8, php7.1]
image: [carlosalgms/composer-and-node-ci]
include: include:
- tag: php8 - tag: php8
buildArgs: "" buildArgs: ""
tags: ${{ env.IMAGE }}:latest,${{ env.IMAGE }}:${{ matrix.tag }} tags: ${{ matrix.image }}:latest,${{ matrix.image }}:${{ matrix.tag }}
- tag: php7.1 - tag: php7.1
buildArgs: | buildArgs: |
PHP_VERSION=7.1 PHP_VERSION=7.1
DEPLOYER_VERSION=v6.6.0 DEPLOYER_VERSION=v6.6.0
COMPOSER_VERSION=2.2.18 COMPOSER_VERSION=2.2.18
tags: ${{ env.IMAGE }}:${{ matrix.tag }} tags: ${{ matrix.image }}:${{ matrix.tag }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -49,7 +48,7 @@ jobs:
pull: true pull: true
push: true push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7 platforms: linux/amd64,linux/arm64,linux/arm/v7
cache-from: ${{ env.IMAGE }}:${{ matrix.tag }} cache-from: ${{ matrix.image }}:${{ matrix.tag }}
cache-to: type=inline cache-to: type=inline
build-args: ${{ matrix.buildArgs }} build-args: ${{ matrix.buildArgs }}
tags: ${{ matrix.tags }} tags: ${{ matrix.tags }}