From bda47bb4fda0a9802c3379c8cab9c15a8b7ba08f Mon Sep 17 00:00:00 2001 From: Matt Henderson Date: Thu, 26 Jan 2023 16:18:49 -0800 Subject: [PATCH 1/9] yaml syntax update --- .github/workflows/pypi_upload.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml index c1c93c00c..2a53c555d 100644 --- a/.github/workflows/pypi_upload.yml +++ b/.github/workflows/pypi_upload.yml @@ -39,18 +39,15 @@ jobs: runs-on: ubuntu-latest name: Sync main with dev steps: - - uses: actions/checkout@v3 - name: Sync main with dev - run: | - git pull --rebase origin main - git push origin dev + uses: actions/checkout@v3 with: ref: dev fetch-depth: 0 token: ${{ github.token }} - #with: - # repo-token: ${{ secrets.GITHUB_TOKEN }} - + - run: | + git pull --rebase origin main + git push origin dev deploy: needs: update_version runs-on: ubuntu-latest From 3b7b15a56602fcedc080ab435d698616ffc3bba6 Mon Sep 17 00:00:00 2001 From: Matt Henderson Date: Thu, 26 Jan 2023 16:43:23 -0800 Subject: [PATCH 2/9] debug workflow failures --- .github/workflows/pypi_upload.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml index 2a53c555d..bcd863c54 100644 --- a/.github/workflows/pypi_upload.yml +++ b/.github/workflows/pypi_upload.yml @@ -21,6 +21,7 @@ jobs: id: changed-files-specific uses: tj-actions/changed-files@v32 with: +# token: ${{ github.token }} files: | py4DSTEM/version.py - name: Running if py4DSTEM/version.py file is not changed @@ -33,8 +34,6 @@ jobs: git config --global user.name "bsavitzky" git commit -a -m "Update version number" git push origin main - env: - token: ${{ github.token }} sync_with_dev: runs-on: ubuntu-latest name: Sync main with dev From 6a1140ff4c73424ae04820d2024e6cbe37932d83 Mon Sep 17 00:00:00 2001 From: Matt Henderson Date: Thu, 26 Jan 2023 16:44:57 -0800 Subject: [PATCH 3/9] Update pypi_upload.yml --- .github/workflows/pypi_upload.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml index bcd863c54..ffb1f8386 100644 --- a/.github/workflows/pypi_upload.yml +++ b/.github/workflows/pypi_upload.yml @@ -21,14 +21,14 @@ jobs: id: changed-files-specific uses: tj-actions/changed-files@v32 with: -# token: ${{ github.token }} + token: ${{ github.token }} files: | py4DSTEM/version.py - name: Running if py4DSTEM/version.py file is not changed if: steps.changed-files-specific.outputs.any_changed == 'false' run: | echo "Version file not changed, running script to change the version file." - git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} + #git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} python .github/scripts/update_version.py git config --global user.email "ben.savitzky@gmail.com" git config --global user.name "bsavitzky" From 292013eec9bb85e665b984c23c58942c864781e7 Mon Sep 17 00:00:00 2001 From: Matt Henderson Date: Thu, 26 Jan 2023 16:49:33 -0800 Subject: [PATCH 4/9] move with token --- .github/workflows/pypi_upload.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml index ffb1f8386..0bbaddb4b 100644 --- a/.github/workflows/pypi_upload.yml +++ b/.github/workflows/pypi_upload.yml @@ -17,11 +17,12 @@ jobs: name: Check if version.py is changed and update if the version.py is not changed steps: - uses: actions/checkout@v3 + with: + token: ${{ github.token }} - name: Get changed files id: changed-files-specific uses: tj-actions/changed-files@v32 with: - token: ${{ github.token }} files: | py4DSTEM/version.py - name: Running if py4DSTEM/version.py file is not changed From 26757bd30a13b322d83d04109b0cf5067aa5f3ac Mon Sep 17 00:00:00 2001 From: Matt Henderson Date: Thu, 26 Jan 2023 17:17:50 -0800 Subject: [PATCH 5/9] update fetch-depth for changed-files --- .github/workflows/pypi_upload.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml index 0bbaddb4b..9009496a7 100644 --- a/.github/workflows/pypi_upload.yml +++ b/.github/workflows/pypi_upload.yml @@ -23,6 +23,7 @@ jobs: id: changed-files-specific uses: tj-actions/changed-files@v32 with: + fetch-depth: 0 files: | py4DSTEM/version.py - name: Running if py4DSTEM/version.py file is not changed From f0535eb9427265753704f729af6014072fb4c851 Mon Sep 17 00:00:00 2001 From: Matt Henderson Date: Thu, 26 Jan 2023 17:19:41 -0800 Subject: [PATCH 6/9] Update pypi_upload.yml --- .github/workflows/pypi_upload.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml index 9009496a7..4a998cd87 100644 --- a/.github/workflows/pypi_upload.yml +++ b/.github/workflows/pypi_upload.yml @@ -18,12 +18,12 @@ jobs: steps: - uses: actions/checkout@v3 with: + fetch-depth: 0 token: ${{ github.token }} - name: Get changed files id: changed-files-specific uses: tj-actions/changed-files@v32 with: - fetch-depth: 0 files: | py4DSTEM/version.py - name: Running if py4DSTEM/version.py file is not changed From 1eb2f2d015c92c15c2b4fac9cdf1c8ace4ddf1a9 Mon Sep 17 00:00:00 2001 From: Matt Henderson Date: Tue, 31 Jan 2023 13:44:25 -0800 Subject: [PATCH 7/9] Remove --rebase --- .github/workflows/pypi_upload.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml index 4a998cd87..5dca76ae1 100644 --- a/.github/workflows/pypi_upload.yml +++ b/.github/workflows/pypi_upload.yml @@ -47,7 +47,7 @@ jobs: fetch-depth: 0 token: ${{ github.token }} - run: | - git pull --rebase origin main + git pull origin main git push origin dev deploy: needs: update_version From d66da033bfd67e7d3315e6282afd306bd0891c5f Mon Sep 17 00:00:00 2001 From: Matt Henderson Date: Tue, 31 Jan 2023 13:56:48 -0800 Subject: [PATCH 8/9] Switch merge strategy Add git config for using default merge strategy before pull command, add flags to pull for commit. --- .github/workflows/pypi_upload.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml index 5dca76ae1..f36b28d3a 100644 --- a/.github/workflows/pypi_upload.yml +++ b/.github/workflows/pypi_upload.yml @@ -47,7 +47,9 @@ jobs: fetch-depth: 0 token: ${{ github.token }} - run: | - git pull origin main + # set strategy to default merge + git config pull.rebase false + git pull origin main --commit --no-edit git push origin dev deploy: needs: update_version From 718a2583abe70fdf1e4466ac610347eee15bd053 Mon Sep 17 00:00:00 2001 From: Matt Henderson Date: Tue, 31 Jan 2023 13:58:20 -0800 Subject: [PATCH 9/9] Add username email to commit config --- .github/workflows/pypi_upload.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml index f36b28d3a..a44eceaf4 100644 --- a/.github/workflows/pypi_upload.yml +++ b/.github/workflows/pypi_upload.yml @@ -49,6 +49,8 @@ jobs: - run: | # set strategy to default merge git config pull.rebase false + git config --global user.email "ben.savitzky@gmail.com" + git config --global user.name "bsavitzky" git pull origin main --commit --no-edit git push origin dev deploy: