Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stefanzweifel/reusable-workflows
A collection of reusable GitHub Actions workflows I use in my public and private projects.
https://github.com/stefanzweifel/reusable-workflows
Last synced: 17 days ago
JSON representation
A collection of reusable GitHub Actions workflows I use in my public and private projects.
- Host: GitHub
- URL: https://github.com/stefanzweifel/reusable-workflows
- Owner: stefanzweifel
- License: mit
- Created: 2023-12-04T19:32:16.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-23T18:46:47.000Z (about 2 months ago)
- Last Synced: 2024-12-23T19:38:06.783Z (about 2 months ago)
- Homepage: https://stefanzweifel.dev/posts/2024/03/03/my-reusable-github-actions-workflows
- Size: 14.6 KB
- Stars: 30
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# reusable-workflows
A collection of reusable GitHub Actions workflows I use in my public and private projects.## auto-merge-dependabot-pr.yml
Workflow that can automatically merge Dependabot pull requests after the CI builds has run successfully. Below is an example workflow you can use in your repository. The workflow is executed when the "Integrate" ran completed successfully.
```yml
# .github/workflows/auto-merge.yml
name: Merge me!on:
workflow_run:
types:
- completed
workflows:
- 'Integrate'jobs:
merge-me:
uses: stefanzweifel/reusable-workflows/.github/workflows/auto-merge-dependabot-pr.yml@main
secrets:
MERGE_ME_GITHUB_TOKEN: ${{ secrets.MERGE_ME_GITHUB_TOKEN }}
```## `backup-restore.yml`
Workflow to run [laravel-backup-restore](https://github.com/stefanzweifel/laravel-backup-restore) and restore a database backup in a Laravel app. The backup must be stored on an AWS S3 bucket.
The passed `app_name` will be used as `APP_NAME` and will be used to find the latest backup for your app.
```yml
# .github/workflows/backup-restore.yml
name: backupon:
workflow_dispatch:
schedule:
- cron: "0 14 1 * *"jobs:
restore:
uses: stefanzweifel/reusable-workflows/.github/workflows/backup-restore.yml@main
with:
# Value of `APP_NAME` env variable. Used to locate backup on remote disk.
app_name: 'My Laravel App'
php_version: '8.3'
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_BACKUP_BUCKET: ${{ secrets.AWS_BACKUP_BUCKET }}
BACKUP_ARCHIVE_PASSWORD: ${{ secrets.BACKUP_ARCHIVE_PASSWORD }}
```## `laravel-pint-fixer.yml`
Workflow to run [Laravel Pint](https://github.com/laravel/pint) and automatically fix code style violations. Changes are pushed back to the GitHub repository.
```yml
# .github/workflows/laravel-pint-fixer.yml
name: Laravel Pinton:
pull_request:
push:
branches:
- mainpermissions:
contents: writejobs:
pint:
uses: stefanzweifel/reusable-workflows/.github/workflows/laravel-pint-fixer.yml@main
```## `php-cs-fixer.yml`
Workflow to run `php-cs-fixer` and automatically fix code style violations. Changes are pushed back to the GitHub repository.
```yml
# .github/workflows/php-cs-fixer.yml
name: php-cs-fixeron:
pull_request:
push:
branches:
- mainpermissions:
contents: writejobs:
php-cs-fixer:
uses: stefanzweifel/reusable-workflows/.github/workflows/php-cs-fixer.yml@main
```## `phpstan.yml`
Workflow to run [PHPStan](https://phpstan.org/) in projects.
To prevent usage spikes, the job is not executed if the user is Dependabot.```yml
# .github/workflows/phpstan.yml
name: PHPStanon:
pushjobs:
update_release_draft:
uses: stefanzweifel/reusable-workflows/.github/workflows/phpstan.yml@main
with:
php_version: '8.3'
```## `post-release-comments.yml`
This workflow uses [Duncan McClean](https://github.com/duncanmcclean/)'s [post-release-comments](https://github.com/duncanmcclean/post-release-comments) action to notify users in issues and pull requests, if their issue or pull request has been mentioned in a release.
```yml
# .github/workflows/post-release-comments.yml
name: Post Release Commentson:
release:
types: [released]jobs:
comments:
uses: stefanzweifel/reusable-workflows/.github/workflows/post-release-comments.yml@main
```## `release-drafter.yml`
Workflow to run [release-drafter](https://github.com/release-drafter/release-drafter) in projects.
To prevent usage spikes, the job is not executed if the user is Dependabot.```yml
# .github/workflows/release-drafter.yml
name: Release Drafteron:
push:
branches:
- mainpermissions:
contents: writejobs:
update_release_draft:
uses: stefanzweifel/reusable-workflows/.github/workflows/release-drafter.yml@main
```## `update-changelog.yml`
Workflow to automatically update a projects `CHANGELOG.md` with the release notes of a new GitHub release.
The release name is used as a heading in the changelog. The release body is treated as release notes and will be placed below the release heading.```yml
# .github/workflows/update-changelog.yml
name: "Update Changelog"on:
release:
types: [released]permissions:
contents: writejobs:
update:
uses: stefanzweifel/reusable-workflows/.github/workflows/update-changelog.yml@main
```