fix: Action TOKEN
This commit is contained in:
@@ -19,15 +19,15 @@ jobs:
|
|||||||
- name: Clone repository with submodules
|
- name: Clone repository with submodules
|
||||||
run: |
|
run: |
|
||||||
echo "Checking secrets.token..."
|
echo "Checking secrets.token..."
|
||||||
if [ -z "${{ secrets.TOKEN }}" ]; then
|
if [ -z "${{ secrets.TOKEN_BUILD }}" ]; then
|
||||||
echo "ERROR: Secret TOKEN tidak ditemukan!"
|
echo "ERROR: Secret TOKEN_BUILD tidak ditemukan!"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "Secret TOKEN is set"
|
echo "Secret TOKEN is set"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git clone --recurse-submodules -c "url.https://token:${{ secrets.TOKEN }}@git.datadunia.com/.insteadOf=https://git.datadunia.com/" https://git.datadunia.com/devops/wireguard-vpn.git
|
git clone --recurse-submodules -c "url.https://token:${{ secrets.TOKEN_BUILD }}@git.datadunia.com/.insteadOf=https://git.datadunia.com/" https://git.datadunia.com/devops/wireguard-vpn.git
|
||||||
git config --global http."https://git.datadunia.com/".extraheader "Authorization: token ${{ secrets.TOKEN }}"
|
git config --global http."https://git.datadunia.com/".extraheader "Authorization: Bearer ${{ secrets.TOKEN_BUILD }}"
|
||||||
git config --global core.askPass ""
|
git config --global core.askPass ""
|
||||||
git clone --recurse-submodules https://git.datadunia.com/devops/wireguard-vpn.git .
|
git clone --recurse-submodules https://git.datadunia.com/devops/wireguard-vpn.git .
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ jobs:
|
|||||||
- name: Cleanup Git Config
|
- name: Cleanup Git Config
|
||||||
if: always() # Pastikan tetap jalan meski job gagal
|
if: always() # Pastikan tetap jalan meski job gagal
|
||||||
run: |
|
run: |
|
||||||
# git config --global --unset-all url."https://token:${{ secrets.TOKEN }}@${{ gitea.server_url | replace("https://", "") }}/".insteadOf
|
# git config --global --unset-all url."https://token:${{ secrets.TOKEN_BUILD }}@${{ gitea.server_url | replace("https://", "") }}/".insteadOf
|
||||||
# Hapus header dan config agar tidak tersimpan di ~/.gitconfig host
|
# Hapus header dan config agar tidak tersimpan di ~/.gitconfig host
|
||||||
git config --global --unset http.extraheader
|
git config --global --unset http.extraheader
|
||||||
git config --global --unset core.askPass
|
git config --global --unset core.askPass
|
||||||
|
|||||||
Reference in New Issue
Block a user