fix: use secrets for submodule auth
This commit is contained in:
@@ -18,11 +18,13 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
||||
with:
|
||||
submodules: false
|
||||
|
||||
- name: Checkout submodules with auth
|
||||
run: |
|
||||
git submodule init
|
||||
git submodule set-url app "https://${{ gitea.actor }}:${{ gitea.token }}@git.datadunia.com/hainzero/WGRplane.git"
|
||||
git config submodule.app.url "https://${{ secrets.USERNAME }}:${{ secrets.TOKEN }}@git.datadunia.com/hainzero/WGRplane.git"
|
||||
git submodule update --init --recursive
|
||||
|
||||
- name: Debug - List app directory
|
||||
@@ -64,11 +66,13 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
||||
with:
|
||||
submodules: false
|
||||
|
||||
- name: Checkout submodules with auth
|
||||
run: |
|
||||
git submodule init
|
||||
git submodule set-url app "https://${{ gitea.actor }}:${{ gitea.token }}@git.datadunia.com/hainzero/WGRplane.git"
|
||||
git config submodule.app.url "https://${{ secrets.USERNAME }}:${{ secrets.TOKEN }}@git.datadunia.com/hainzero/WGRplane.git"
|
||||
git submodule update --init --recursive
|
||||
|
||||
- name: Download all artifacts
|
||||
@@ -92,8 +96,8 @@ jobs:
|
||||
"release_date": "$RELEASE_DATE",
|
||||
"changelog": $(echo "$CHANGELOG" | jq -R -s '.'),
|
||||
"download_urls": {
|
||||
"amd64": "${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}/artifacts/$(curl -s -H 'Authorization: Bearer ${{ gitea.token }}' '${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}/artifacts' | jq -r '.data[] | select(.name == "wgrplane-linux-amd64") | .id')",
|
||||
"arm64": "${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}/artifacts/$(curl -s -H 'Authorization: Bearer ${{ gitea.token }}' '${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}/artifacts' | jq -r '.data[] | select(.name == "wgrplane-linux-arm64") | .id')"
|
||||
"amd64": "${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}/artifacts/$(curl -s -H 'Authorization: Bearer ${{ secrets.TOKEN }}' '${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}/artifacts' | jq -r '.data[] | select(.name == \"wgrplane-linux-amd64\") | .id')",
|
||||
"arm64": "${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}/artifacts/$(curl -s -H 'Authorization: Bearer ${{ secrets.TOKEN }}' '${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}/artifacts' | jq -r '.data[] | select(.name == \"wgrplane-linux-arm64\") | .id')"
|
||||
}
|
||||
}
|
||||
EOF
|
||||
@@ -107,7 +111,7 @@ jobs:
|
||||
run: |
|
||||
git config user.name "Gitea Actions"
|
||||
git config user.email "actions@gitea.com"
|
||||
git remote set-url origin "https://${{ gitea.actor }}:${{ gitea.token }}@${{ gitea.server_url }}/${{ gitea.repository }}.git"
|
||||
git remote set-url origin "https://${{ secrets.USERNAME }}:${{ secrets.TOKEN }}@${{ gitea.server_url }}/${{ gitea.repository }}.git"
|
||||
git add latest.json
|
||||
git commit -m "Update latest.json for release ${{ gitea.ref_name }} [skip ci]" || echo "No changes to commit"
|
||||
git push origin main
|
||||
|
||||
Reference in New Issue
Block a user