Skip to content

Commit 05800a4

Browse files
authored
CI: Fix the dvc issue with an access token (#8799)
1 parent 1b677ba commit 05800a4

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

.github/workflows/docs.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ jobs:
8282
GH_TOKEN: ${{ github.token }}
8383

8484
- name: Pull baseline image data from dvc remote
85-
run: dvc pull --no-run-cache
85+
run: |
86+
dvc remote modify origin url https://${DAGSHUB_TOKEN}@dagshub.com/GenericMappingTools/gmt.dvc --local
87+
dvc pull --no-run-cache
88+
env:
89+
DAGSHUB_TOKEN: ${{ secrets.DAGSHUB_TOKEN }}
8690

8791
- name: Configure GMT
8892
run: |

.github/workflows/dvc-diff.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
paths:
1515
- '**/*.dvc'
1616

17+
permissions:
18+
contents: read
19+
pull-requests: write
20+
1721
jobs:
1822
dvc-diff:
1923
name: DVC image diff
@@ -65,7 +69,8 @@ jobs:
6569
# Report last updated at commit abcdef
6670
- name: Generate the image diff report
6771
env:
68-
repo_token: ${{ secrets.GITHUB_TOKEN }}
72+
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
DAGSHUB_TOKEN: ${{ secrets.DAGSHUB_TOKEN }}
6974
run: |
7075
echo -e "## Summary of changed images\n" > report.md
7176
echo -e "This is an auto-generated report of images that have changed on the DVC remote\n" >> report.md
@@ -74,6 +79,7 @@ jobs:
7479
git fetch origin master
7580
7681
# Pull image data from cloud storage
82+
dvc remote modify origin url https://${DAGSHUB_TOKEN}@dagshub.com/GenericMappingTools/gmt.dvc --local
7783
dvc pull --remote origin
7884
dvc pull --remote origin
7985
dvc diff --md master HEAD >> report.md

.github/workflows/release-baseline-images.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ jobs:
2727

2828
- name: Pull baseline image data from dvc remote
2929
run: |
30+
dvc remote modify origin url https://${DAGSHUB_TOKEN}@dagshub.com/GenericMappingTools/gmt.dvc --local
3031
dvc pull
3132
ls -lhR test/baseline/
33+
env:
34+
DAGSHUB_TOKEN: ${{ secrets.DAGSHUB_TOKEN }}
3235

3336
- name: Create the baseline image asset in zip format
3437
run: |

.github/workflows/tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ jobs:
122122
if: runner.os == 'Windows'
123123

124124
- name: Pull baseline image data from dvc remote
125-
run: dvc pull --no-run-cache
125+
run: |
126+
dvc remote modify origin url https://${DAGSHUB_TOKEN}@dagshub.com/GenericMappingTools/gmt.dvc --local
127+
dvc pull --no-run-cache
128+
env:
129+
DAGSHUB_TOKEN: ${{ secrets.DAGSHUB_TOKEN }}
126130

127131
- name: Install GMT
128132
run: |

0 commit comments

Comments
 (0)