-
Notifications
You must be signed in to change notification settings - Fork 45
33 lines (32 loc) · 1.12 KB
/
import_pending.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: import-pending
on:
push:
branches:
- master
jobs:
import-pending:
strategy:
fail-fast: false
runs-on: ubuntu-20.04
if: github.repository == 'FirelandsProject/firelands-cata'
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Extract branch name
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Import and commit pending sql
run: |
git config user.email "[email protected]" && git config user.name "Firelands Bot"
bash bin/firelands-db-pendings
git fetch --unshallow origin ${BRANCH}
git add -A .
git commit -am "chore(DB): import pending files" -m "Referenced commit(s): ${GITHUB_SHA}" || true
env:
BRANCH: ${{ steps.extract_branch.outputs.branch }}
- name: Push changes
uses: ad-m/github-push-action@fe38f0a751bf9149f0270cc1fe20bf9156854365
with:
github_token: ${{ secrets.FC_GITHUB_TOKEN }}
branch: ${{ steps.extract_branch.outputs.branch }}