File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : sync-to-azure
2+
3+ on :
4+ push
5+
6+ concurrency :
7+ group : ${{ github.workflow }}-${{ github.ref }}
8+ cancel-in-progress : true
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v4
15+ with :
16+ fetch-depth : 0 # <-- clone with complete history
17+
18+ # Powershell: [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("dirkarnez:MY_PAT"))
19+ - continue-on-error : true
20+ run : |
21+ result="$(echo -n "dirkarnez:${{ secrets.AZURE_PAT }}" | base64 | tr -d '\n')" && \
22+ curl -X POST "https://dev.azure.com/dirkarnez/My%20GitHub%20backup/_apis/git/repositories?api-version=7.1" \
23+ -H 'Content-Type: application/json' \
24+ -H "Authorization: Basic $result" \
25+ -d '{"name":"${{ github.event.repository.name }}"}' && \
26+ ls
27+
28+ # - uses: yesolutions/[email protected] 29+ # with:
30+ # REMOTE: ssh://[email protected] /dirkarnez/${{ github.event.repository.name }}.git 31+ # GIT_SSH_PRIVATE_KEY: ${{ secrets.GIT_SSH_PRIVATE_KEY }}
32+ # GIT_SSH_NO_VERIFY_HOST: "true"
33+
34+ # https://github.com/dirkarnez/internal-git-notes/blob/master/Bitbucket/azure/private-openssh-format
35+ -
uses :
yesolutions/[email protected] 36+ with :
37+ REMOTE :
[email protected] :v3/dirkarnez/My%20GitHub%20backup/${{ github.event.repository.name }} 38+ GIT_SSH_PRIVATE_KEY : ${{ secrets.AZURE_REPO_SSH_PRIVATE_KEY }}
39+ GIT_SSH_NO_VERIFY_HOST : " true"
You can’t perform that action at this time.
0 commit comments