Skip to content

Commit

Permalink
Update sync_configs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
solnic committed Jan 9, 2020
1 parent 297b125 commit 1c99ad4
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/sync_configs.yml
Expand Up @@ -9,6 +9,9 @@ jobs:
sync-configs:
runs-on: ubuntu-latest
if: github.event.action == 'sync_configs'
env:
GITHUB_LOGIN: dry-bot
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
steps:
- uses: actions/checkout@v1
- name: Set up Ruby
Expand All @@ -26,16 +29,21 @@ jobs:
- name: Clone devtools
run: git clone https://github.com/dry-rb/devtools.git tmp/devtools
- name: Compile file templates
env:
GITHUB_LOGIN: dry-bot
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
run: |
if [ -f "project.yml" ]; then
for t in `ls tmp/devtools/templates`
do
bin/ossy t c $t $(echo $t | sed -e 's/^tmp\/devtools\/templates\///g' | sed -e 's/\.erb$//g') project.yml
bin/ossy t c tmp/devtools/templates/$t $(basename $t .erb) project.yml
done
fi
- name: Merge configuration files from devtools
run: |
for f in `ls tmp/devtools/workflows/*.yml`
do
n="$(basename $f)";
c=".github/workflows/custom/$n";
[ -f $c ] && bin/ossy c m $f $c .github/workflows/$n || echo "no custom config found for $f"
done
- name: Update configuration files from devtools
run: |
if [ -f ".github/workflows/custom_ci.yml" ]; then
Expand Down

0 comments on commit 1c99ad4

Please sign in to comment.