diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 4d71c8f..a036263 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -17,7 +17,12 @@ jobs: image: composer:2 steps: - - uses: actions/checkout@v3 + - name: Checkout + run: | + git init . + git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@$(echo "${{ github.server_url }}" | sed -E 's|https?://||')/${{ github.repository }}.git" + git fetch --depth 1 origin "${{ github.ref }}" + git checkout FETCH_HEAD - name: Build release zip run: | diff --git a/.gitea/workflows/tests.yaml b/.gitea/workflows/tests.yaml index d5c4406..186d52d 100644 --- a/.gitea/workflows/tests.yaml +++ b/.gitea/workflows/tests.yaml @@ -13,18 +13,15 @@ jobs: image: composer:2 steps: - - uses: actions/checkout@v3 + - name: Checkout + run: | + git init . + git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@$(echo "${{ github.server_url }}" | sed -E 's|https?://||')/${{ github.repository }}.git" + git fetch --depth 1 origin "${{ github.ref }}" + git checkout FETCH_HEAD - name: Install Composer dependencies run: composer install --no-interaction --prefer-dist - name: Run PHPUnit run: vendor/bin/phpunit - if: always() - - - name: Run Psalm - run: | - curl -sSL https://github.com/vimeo/psalm/releases/download/4.30.0/psalm.phar -o /usr/local/bin/psalm - chmod +x /usr/local/bin/psalm - psalm --no-cache - if: always()