PR: fixing repo clone

This commit is contained in:
XargonWan 2024-11-08 09:41:15 +09:00
parent 9280f5a116
commit 85199bf690

View file

@ -10,23 +10,16 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # Retrieve full history to allow merging
- name: Configure the upstream
run: | run: |
CURRENT_BRANCH="${{ github.ref_name }}" # Manually fully clone the repo
git clone "https://github.com/${{ github.repository }}" .
git fetch --all --tags --prune
git remote add upstream "https://github.com/flathub/${{ github.event.repository.name }}" git remote add upstream "https://github.com/flathub/${{ github.event.repository.name }}"
git fetch upstream git fetch upstream --tags
git fetch origin git checkout "${{ github.ref_name }}"
git branch --set-upstream-to=upstream/${{ github.ref_name }} ${{ github.ref_name }}
git branch --set-upstream-to=upstream/$CURRENT_BRANCH $CURRENT_BRANCH
- name: Generate a token for Rekku - name: Generate a token for Rekku
if: ${{ github.repository == 'RetroDECK/RetroDECK' }}
id: generate-rekku-token id: generate-rekku-token
uses: actions/create-github-app-token@v1 uses: actions/create-github-app-token@v1
with: with: