-
Notifications
You must be signed in to change notification settings - Fork 18
51 lines (44 loc) · 1.55 KB
/
update_source_data_schema_changelog.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Update changelog for Source Data
on:
push:
branches:
- patch/update-source-data-schema-changelog
concurrency:
group: ${{ github.workflow }}-${{ github.ref_protected == 'true' && github.sha || github.ref }}-{{ github.event_name }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Run Bash Script
run: |
set -x
cd $GITHUB_WORKSPACE
cp -r schemas/ new_schemas/
git clone --branch master https://github.com/stellar/stellar-etl-airflow.git repo_master_copy
cp -r repo_master_copy/schemas/ original_schemas/
output=$(python3 scripts/get_source_data_schema_changelog.py)
echo "$output" > changelog/source_data.md
- name: Commit changes
id: commit_changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add changelog/source_data.md
if git commit -m "Update changelog for Source data"; then
echo "Changes committed."
echo "changes_committed=true" >> $GITHUB_OUTPUT
else
echo "No changes to commit."
echo "changes_committed=false" >> $GITHUB_OUTPUT
fi
- name: Push branch
if: steps.commit_changes.outputs.changes_committed == 'true'
run: |
git push