-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add .github/workflows/sync_configs.yml
- Loading branch information
File Sync
committed
Sep 21, 2023
1 parent
96d48cd
commit 613a087
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# This file is synced from dry-rb/template-gem repo | ||
|
||
name: sync | ||
|
||
on: | ||
repository_dispatch: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
if: (github.event_name == 'repository_dispatch' && github.event.action == 'sync_configs') || github.event_name != 'repository_dispatch' | ||
env: | ||
GITHUB_LOGIN: dry-bot | ||
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | ||
steps: | ||
- name: Checkout ${{github.repository}} | ||
uses: actions/checkout@v3 | ||
- name: Checkout devtools | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: dry-rb/devtools | ||
path: tmp/devtools | ||
- name: Setup git user | ||
run: | | ||
git config --local user.email "dry-bot@dry-rb.org" | ||
git config --local user.name "dry-bot" | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.1" | ||
- name: Install dependencies | ||
run: gem install ossy --no-document | ||
- name: Update changelog.yml from commit | ||
run: tmp/devtools/bin/update-changelog-from-commit $GITHUB_SHA | ||
- name: Compile CHANGELOG.md | ||
run: tmp/devtools/bin/compile-changelog | ||
- name: Commit | ||
run: | | ||
git add -A | ||
git commit -m "[devtools] sync" || echo "nothing to commit" | ||
- name: Push changes | ||
run: | | ||
git pull --rebase origin main | ||
git push https://dry-bot:${{secrets.GH_PAT}}@github.com/${{github.repository}}.git HEAD:main |