Skip to content

Commit

Permalink
update github worfkow
Browse files Browse the repository at this point in the history
  • Loading branch information
panakour committed Dec 18, 2023
1 parent 96fad2a commit 9e03004
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
php-versions: [ '8.1', '8.2', '8.3' ]
steps:
- name: Checkout codebase
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
Expand Down Expand Up @@ -41,10 +41,32 @@ jobs:
- name: Run Unit Tests
run: XDEBUG_MODE_COVERAGE=coverage vendor/bin/phpunit

- if: ${{ (matrix.php-versions == '8.1') }}
- if: ${{ (matrix.php-versions == '8.3') }}
name: Generate test coverage badge
uses: timkrase/[email protected].0
uses: timkrase/[email protected].1
with:
coverage_badge_path: 'coverage-badge.svg'
push_badge: true
repo_token: ${{ secrets.GITHUB_TOKEN }}
coverage_badge_path: output/coverage.svg
push_badge: false

- if: ${{ (matrix.php-versions == '8.3') }}
name: Git push to image-data branch
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./output
publish_branch: image-data
github_token: ${{ secrets.GITHUB_TOKEN }}
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'

release:
permissions:
contents: write
name: "Tagged Release"
needs: test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false

0 comments on commit 9e03004

Please sign in to comment.