Skip to content

Commit

Permalink
Add sync_configs workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
solnic committed Oct 16, 2019
1 parent 786392d commit e7ef477
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/sync_configs.yml
@@ -0,0 +1,31 @@
name: sync_configs

on:
repository_dispatch:

jobs:
sync-configs:
runs-on: ubuntu-latest
if: github.event.action == 'sync_configs'
steps:
- uses: actions/checkout@v1
- name: Update configuration files from devtools
env:
GITHUB_LOGIN: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
run: |
mkdir tmp
git clone https://github.com/dry-rb/devtools.git tmp/devtools
cd tmp/devtools
for file in `find shared -type f`; do cp -v $file ../../$(echo $file | sed -e "s/shared\///"); done
cd ../..
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -A
git commit -m "[devtools] config sync"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_PAT }}

0 comments on commit e7ef477

Please sign in to comment.