tune workflow
This commit is contained in:
		@ -56,20 +56,20 @@ jobs:
 | 
			
		||||
          git checkout -B analytics-update
 | 
			
		||||
          git add analytics/
 | 
			
		||||
          if git diff --cached --quiet; then
 | 
			
		||||
            echo "ANALYTICS_CHANGES=false" >> $GITEA_ENV
 | 
			
		||||
            echo "ANALYTICS_CHANGES=false" >> $GITHUB_OUTPUT
 | 
			
		||||
          else
 | 
			
		||||
            git commit -m "chore: update analytics data"
 | 
			
		||||
            git push origin analytics-update --force
 | 
			
		||||
            echo "ANALYTICS_CHANGES=true" >> $GITEA_ENV
 | 
			
		||||
            echo "ANALYTICS_CHANGES=true" >> $GITHUB_OUTPUT
 | 
			
		||||
          fi
 | 
			
		||||
 | 
			
		||||
      - name: Create Pull Request in Gitea
 | 
			
		||||
        if: env.ANALYTICS_CHANGES == 'true'
 | 
			
		||||
        if: steps.commit_step.outputs.ANALYTICS_CHANGES == 'true'
 | 
			
		||||
        run: |
 | 
			
		||||
          curl -X POST \
 | 
			
		||||
            -H "Content-Type: application/json" \
 | 
			
		||||
            -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
 | 
			
		||||
            https://gitea.eco.tsi-dev.otc-service.com/api/v1/repos/infra/otc-metadata-rework/pulls \
 | 
			
		||||
            https://gitea.example/api/v1/repos/org/repo/pulls \
 | 
			
		||||
            -d '{
 | 
			
		||||
              "title": "chore: weekly update analytics data",
 | 
			
		||||
              "head": "analytics-update",
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user