diff --git a/.github/workflows/pr-test-lint.yml b/.github/workflows/pr-test-lint.yml index 373ebbc645..c144c4d2bc 100644 --- a/.github/workflows/pr-test-lint.yml +++ b/.github/workflows/pr-test-lint.yml @@ -65,12 +65,6 @@ jobs: - name: Import environment variables from file run: cat ".github/env" >> $GITHUB_ENV - - name: Debug event - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: | - echo "$GITHUB_CONTEXT" | jq - - name: Install Go uses: actions/setup-go@v5 with: diff --git a/.github/workflows/update-deps.yaml b/.github/workflows/update-deps.yaml index 8ff7100fc9..aa5049550a 100644 --- a/.github/workflows/update-deps.yaml +++ b/.github/workflows/update-deps.yaml @@ -14,6 +14,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + ssh-key: ${{ secrets.CNQUERY_DEPLOY_KEY_PRIV }} - name: Import environment variables from file run: cat ".github/env" >> $GITHUB_ENV @@ -47,13 +49,25 @@ jobs: git add providers/ || true COMMIT_MSG="🧹 Update deps for cnquery and providers $(date +%Y%m%d)" echo "COMMIT_TITLE=${COMMIT_MSG}" >> $GITHUB_OUTPUT + echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_OUTPUT git commit -m "${COMMIT_MSG}" git push --set-upstream origin ${BRANCH_NAME} shell: bash - name: Create pull request + id: cpr if: ${{ steps.update-deps.outputs.COUNT_GOMOD != '0' }} + uses: peter-evans/create-pull-request@v5 + with: + draft: true + # base: main + labels: dependencies,go + title: ${{ steps.branch.outputs.COMMIT_TITLE }} + branch: ${{ steps.branch.outputs.BRANCH_NAME }} + body-path: .github/pr-body.md + + - name: PR infos + if: ${{ steps.cpr.outputs.pull-request-number }} run: | - gh pr create --base main --label dependencies --label go --title "${{ steps.branch.outputs.COMMIT_TITLE }}" --body-file .github/pr-body.md - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" + echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" \ No newline at end of file