From 502f7cbcdf6125dd2f7fb85dc084bd14751e4304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jalil=20David=20Salam=C3=A9=20Messina?= Date: Sun, 22 Dec 2024 13:40:05 +0100 Subject: [PATCH] fix(ci): remove tea `tea` doesn't like the forgejo GITHUB_TOKENs and doesn't work. --- .forgejo/workflows/update.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/update.yml b/.forgejo/workflows/update.yml index 59f1214..8992715 100644 --- a/.forgejo/workflows/update.yml +++ b/.forgejo/workflows/update.yml @@ -9,7 +9,7 @@ env: Automation to keep dependencies in `Cargo.lock` current. The following is the output from `cargo update`: - COMMIT_MESSAGE: "chore: cargo update \n\n" + COMMIT_MESSAGE: "chore(deps): cargo update" jobs: update-cargo: runs-on: nixos @@ -24,6 +24,7 @@ jobs: set -xeuo pipefail echo "${COMMIT_MESSAGE}" > commit.txt + printf '\n\n' >> commit.txt cat cargo_update.log >> commit.txt echo "${PR_MESSAGE}" > body.md @@ -54,9 +55,17 @@ jobs: # PRs opened from a workflow using the standard `GITHUB_TOKEN` in GitHub Actions # do not automatically trigger more workflows: # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow - # GITHUB_TOKEN: ${{ secrets.DEPS_UPDATER_GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - set -xeuo pipefail - tea login add --token "$GITHUB_TOKEN" - tea pr create --title "${PR_TITLE}" --description "$(cat body.md)" --repo "$GITHUB_REPOSITORY" + set -euo pipefail + curl -X POST \ + -H "Authorization: token $GITHUB_TOKEN" \ + -H 'Content-Type: application/json' \ + -d "$( + echo '{}' | + jq --arg body "$(cat body.md)" \ + --arg title "$COMMIT_MESSAGE" \ + --arg head "$BRANCH_NAME" \ + '{"body": $body, "title": $title, "head": $head, "base": "main"}' + )" \ + "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/pulls" -- 2.47.0