fix(ci): use gitea.token instead of secrets for authentication
This commit is contained in:
@@ -17,7 +17,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
run: |
|
||||
git clone --depth=1 --branch=${GITHUB_REF_NAME} https://oauth2:${{ secrets.GITEA_TOKEN }}@${GITHUB_SERVER_URL#*://}/${GITHUB_REPOSITORY}.git .
|
||||
git clone --depth=1 --branch=${GITHUB_REF_NAME} https://oauth2:${{ gitea.token }}@${GITHUB_SERVER_URL#*://}/${GITHUB_REPOSITORY}.git .
|
||||
git checkout ${GITHUB_SHA}
|
||||
|
||||
- name: Install Python and uv
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
run: |
|
||||
git clone --depth=1 --branch=${GITHUB_REF_NAME} https://oauth2:${{ secrets.GITEA_TOKEN }}@${GITHUB_SERVER_URL#*://}/${GITHUB_REPOSITORY}.git .
|
||||
git clone --depth=1 --branch=${GITHUB_REF_NAME} https://oauth2:${{ gitea.token }}@${GITHUB_SERVER_URL#*://}/${GITHUB_REPOSITORY}.git .
|
||||
git checkout ${GITHUB_SHA}
|
||||
|
||||
- name: Install Python and uv
|
||||
@@ -86,7 +86,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
run: |
|
||||
git clone --depth=1 --branch=${GITHUB_REF_NAME} https://oauth2:${{ secrets.GITEA_TOKEN }}@${GITHUB_SERVER_URL#*://}/${GITHUB_REPOSITORY}.git .
|
||||
git clone --depth=1 --branch=${GITHUB_REF_NAME} https://oauth2:${{ gitea.token }}@${GITHUB_SERVER_URL#*://}/${GITHUB_REPOSITORY}.git .
|
||||
git checkout ${GITHUB_SHA}
|
||||
|
||||
- name: Build web image
|
||||
@@ -110,12 +110,12 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
run: |
|
||||
git clone --depth=1 --branch=${GITHUB_REF_NAME} https://oauth2:${{ secrets.GITEA_TOKEN }}@${GITHUB_SERVER_URL#*://}/${GITHUB_REPOSITORY}.git .
|
||||
git clone --depth=1 --branch=${GITHUB_REF_NAME} https://oauth2:${{ gitea.token }}@${GITHUB_SERVER_URL#*://}/${GITHUB_REPOSITORY}.git .
|
||||
git checkout ${GITHUB_SHA}
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
run: |
|
||||
echo "${{ secrets.GITEA_TOKEN }}" | docker login ${{ vars.GITEA_REGISTRY_URL }} -u ${{ secrets.GITEA_USERNAME }} --password-stdin
|
||||
echo "${{ gitea.token }}" | docker login ${{ vars.GITEA_REGISTRY_URL }} -u ${{ gitea.actor }} --password-stdin
|
||||
|
||||
- name: Build and push images
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user