From f395a2d5ac9ccffedc90c2dddda14d634039f19b Mon Sep 17 00:00:00 2001 From: Adam Taylor Date: Sat, 1 Jul 2023 09:41:29 +0100 Subject: [PATCH] Fix config paths --- .github/workflows/ci-update-mtdca.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-update-mtdca.yml b/.github/workflows/ci-update-mtdca.yml index 9213db49..81af2ce5 100644 --- a/.github/workflows/ci-update-mtdca.yml +++ b/.github/workflows/ci-update-mtdca.yml @@ -14,6 +14,7 @@ jobs: steps: - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: '3.9' @@ -79,23 +80,30 @@ jobs: echo "Using github.sha: ${{ github.sha }}" sed -i "s|https://raw.githubusercontent.com/ncihtan/data-models/[^/]\+/HTAN.model.jsonld|https://raw.githubusercontent.com/ncihtan/data-models/${{ github.sha }}/HTAN.model.jsonld|" dcc_config.csv fi + - name: Commit and push changes to target repository run: | # Set up the GitHub token for authentication git config --global credential.helper store git config --global user.email "adam.taylor@sagebase.org" git config --global user.name "Adam Taylor" - # Replace `` with the username or organization name of the target repository owner - # Replace `` with the name of the target repository - # Replace `update-csv` with the name of the branch you want to push the changes to + + # Clone the config repo and make a branch git clone https://github.com/adamjtaylor/data_curator_config.git cd data_curator_config git checkout -b update-csv-${{ github.run_id }}-${{ github.run_attempt }} + + # Add the dcc_config.csv cp ../dcc_config.csv dcc_config.csv git add dcc_config.csv git commit -m "Update CSV with release tag" - git add config.json + + # Add the dca-template-config.json + mv ../config.json HTAN/dca-template-config.json + git add HTAN/dca-template-config.json git commit -m "Update config.json" + + # Push to the repository git remote set-url origin "https://${{ secrets.DCA_CONFIG_PAT }}@github.com/adamjtaylor/data_curator_config.git" git push --set-upstream origin update-csv-${{ github.run_id }}-${{ github.run_attempt }}