Skip to content

ci: remove files and include everything #10

ci: remove files and include everything

ci: remove files and include everything #10

Workflow file for this run

name: CD
on:
push:
branches:
- main
- add-ci-cd-workflows
permissions:
contents: read
jobs:
release-please:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
tag_name: ${{ steps.release.outputs.tag_name }}
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: simple
target-branch: ${{ github.ref_name }}
orchestrator:
name: Orchestrator
runs-on: ubuntu-latest
needs:
- release-please
outputs:
any-changed-directories: ${{ steps.changed-directories.outputs.all_changed_and_modified_files_count > 0 && steps.changed-directories.outputs.all_changed_files || null }}
should-build-php-7.4-fpm-nginx: ${{ contains(steps.changed-directories.outputs.all_changed_files, 'php/7.4/fpm-nginx') || null }}
should-build-php-8.0-fpm-nginx: ${{ contains(steps.changed-directories.outputs.all_changed_files, 'php/8.0/fpm-nginx') || null }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: tj-actions/changed-files@v44
id: changed-directories
with:
files_ignore: ".github"
dir_names: true
docker:
name: Docker
if: ${{ needs.release-please.outputs.release_created || needs.orchestrator.outputs.any-changed-directories }}
concurrency:
group: docker-${{ matrix.base }}
needs:
- release-please
- orchestrator
strategy:
fail-fast: false
matrix:
base:
- php/7.4/fpm-nginx
- php/8.0/fpm-nginx
exclude:
- base: ${{ needs.release-please.outputs.release_created || needs.orchestrator.outputs['should-build-php-7.4-fpm-nginx'] && 'ignored' || 'php/7.4/fpm-nginx' }}
- base: ${{ needs.release-please.outputs.release_created || needs.orchestrator.outputs['should-build-php-8.0-fpm-nginx'] && 'ignored' || 'php/8.0/fpm-nginx' }}
uses: ./.github/workflows/docker.yaml
with:
version: ${{ needs.release-please.outputs.release_created && needs.release-please.outputs.tag_name || github.sha}}
local-path: ${{ matrix.base }}
repository: ${{ matrix.base }}
push: true
permissions:
contents: read
id-token: write