name: continuous integration on: workflow_dispatch: push: branches: - master paths: - '.github/workflows/**' - '.env' - 'v*/**' jobs: build: runs-on: ubuntu-20.04 strategy: matrix: # todo rollback changes php_version: ['8.0', '8.3'] steps: - name: Check out repository uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to docker hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Read .env file uses: cardinalby/export-env-action@v2 with: envFile: '.env' - name: Build the Docker images ${{ matrix.php_version }} run: | docker buildx build --cache-from=dannecron/php-for-dev:${{ matrix.php_version }} \ --push \ --platform=linux/amd64,linux/arm64 \ --build-arg COMPOSER_VERSION=${{ env.COMPOSER_VERSION }} \ --tag=dannecron/php-for-dev:${{ matrix.php_version }} \ $( (( "${{ matrix.php_version }}" -eq '8.0' )) && printf %s '--tag=dannecron/php-for-dev:latest') \ ./v${{ matrix.php_version }} echo "Done"