2020-05-13 14:21:13 +08:00
|
|
|
name: Generate stackbrew library
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
paths:
|
|
|
|
- '*/Dockerfile'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
regenerate_stackbrew:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Reattach HEAD
|
|
|
|
run: git checkout ${GITHUB_REF#refs/heads/}
|
|
|
|
|
|
|
|
- name: Regenerate stackbrew library
|
|
|
|
run: make library/caddy
|
|
|
|
|
|
|
|
- name: Configure git
|
|
|
|
run: |
|
|
|
|
git config user.name "${GITHUB_ACTOR}"
|
|
|
|
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
|
|
|
|
|
|
|
- name: Commit and push changes
|
|
|
|
run: |
|
2020-05-13 14:26:35 +08:00
|
|
|
git add library/caddy
|
2020-05-13 14:21:13 +08:00
|
|
|
if output=$(git status --porcelain) && [ ! -z "$output" ]; then
|
|
|
|
git commit -m 'Regenerate stackbrew library'
|
|
|
|
git push
|
|
|
|
fi
|