Skip to content

Commit

Permalink
Merge pull request #84 from WyriHaximus/shared-GHA-workflows
Browse files Browse the repository at this point in the history
Use Shared WorkFlows
  • Loading branch information
WyriHaximus authored Nov 1, 2023
2 parents 6c7d052 + 79bcd72 commit f845185
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 222 deletions.
88 changes: 12 additions & 76 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,81 +1,17 @@
name: Continuous Integration
on:
push:
branches:
- 'main'
- 'master'
- 'refs/heads/v[0-9]+.[0-9]+.[0-9]+'
pull_request:
## This workflow needs the `pull-request` permissions to work for the package diffing
## Refs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions
permissions:
pull-requests: write
contents: read
jobs:
generate-checks-strategy:
name: Generate Checks
runs-on: ubuntu-latest
outputs:
check: ${{ steps.generate-checks-strategy.outputs.check }}
steps:
- uses: actions/checkout@v1
- id: generate-checks-strategy
name: Generate check
run: |
printf "Checks found: %s\r\n" $(make task-list-ci)
printf "::set-output name=check::%s" $(make task-list-ci)
lint:
runs-on: ubuntu-latest
steps:
- name: Lint Code Base
uses: docker://github/super-linter:v2.2.0
composer-install:
strategy:
fail-fast: false
matrix:
php: [7.4, 8.0-rc]
composer: [current, highest]
needs: lint
runs-on: ubuntu-latest
container:
image: wyrihaximusnet/php:${{ matrix.php }}-nts-alpine3.12-dev-root
steps:
- uses: actions/checkout@v1
- name: Cache composer packages
uses: actions/cache@v1
with:
path: ./vendor/
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
- name: Install Dependencies
run: composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
if: matrix.composer == 'lowest'
- name: Install Dependencies
run: composer install --ansi --no-progress --no-interaction --prefer-dist -o
if: matrix.composer == 'current'
- name: Install Dependencies
run: composer update --ansi --no-progress --no-interaction --prefer-dist -o
if: matrix.composer == 'highest'
qa:
strategy:
fail-fast: false
matrix:
php: [7.4, 8.0-rc]
composer: [current, highest]
check: ${{ fromJson(needs.generate-checks-strategy.outputs.check) }}
needs:
- composer-install
- generate-checks-strategy
runs-on: ubuntu-latest
container:
image: wyrihaximusnet/php:${{ matrix.php }}-nts-alpine3.12-dev-root
steps:
- uses: actions/checkout@v1
- name: Cache composer packages
uses: actions/cache@v1
with:
path: ./vendor/
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
- name: Install Dependencies
run: composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
if: matrix.composer == 'lowest'
- name: Install Dependencies
run: composer install --ansi --no-progress --no-interaction --prefer-dist -o
if: matrix.composer == 'current'
- name: Install Dependencies
run: composer update --ansi --no-progress --no-interaction --prefer-dist -o
if: matrix.composer == 'highest'
- name: Fetch Tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
if: matrix.check == 'backward-compatibility-check'
- run: make ${{ matrix.check }}
ci:
name: Continuous Integration
uses: WyriHaximus/github-workflows/.github/workflows/package.yaml@main
76 changes: 0 additions & 76 deletions .github/workflows/craft-release.yaml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/release-managment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release Management
on:
pull_request:
types:
- opened
- labeled
- unlabeled
- synchronize
- reopened
milestone:
types:
- closed
permissions:
contents: write
issues: write
pull-requests: write
jobs:
release-managment:
name: Create Release
uses: WyriHaximus/github-workflows/.github/workflows/package-release-managment.yaml@main
with:
milestone: ${{ github.event.milestone.title }}
description: ${{ github.event.milestone.title }}
70 changes: 0 additions & 70 deletions .github/workflows/set-milestone-on-pr.yaml

This file was deleted.

0 comments on commit f845185

Please sign in to comment.