Try cloning repo #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ old_schemas/ | |
- name: Commit changes | |
id: commit_changes | |
run: | | |
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 |