diff --git a/action.yml b/action.yml index 7a4777f..dd028e0 100644 --- a/action.yml +++ b/action.yml @@ -65,4 +65,5 @@ runs: --destination-token "${{ inputs.destination-token }}" \ --destination-branch "${{ inputs.destination-branch }}" \ --update "${{ inputs.update }}" \ - --prefix "${{ inputs.prefix }}" + --prefix "${{ inputs.prefix }}" \ + run diff --git a/cascading-pr-lib.sh b/cascading-pr-lib.sh index 51b2f9f..ae112dd 100644 --- a/cascading-pr-lib.sh +++ b/cascading-pr-lib.sh @@ -16,6 +16,13 @@ DEBUG=false : ${LOOP_DELAY:=5} +function dependencies() { + if ! which jq curl > /dev/null ; then + apt-get update -qq + apt-get -qq install -y jq curl + fi +} + function debug() { DEBUG=true set -x diff --git a/cascading-pr.sh b/cascading-pr.sh index b3d6ecd..faf76cd 100755 --- a/cascading-pr.sh +++ b/cascading-pr.sh @@ -119,6 +119,7 @@ function finalize_options() { } function run() { + dependencies repo_login ${options[destination_repo]} upsert_branch upsert_pr diff --git a/forgejo-curl.sh b/forgejo-curl.sh old mode 100644 new mode 100755 diff --git a/tests/originrepo/.forgejo/workflows/test.yml b/tests/originrepo/.forgejo/workflows/test.yml index 96865fd..9b709da 100644 --- a/tests/originrepo/.forgejo/workflows/test.yml +++ b/tests/originrepo/.forgejo/workflows/test.yml @@ -14,7 +14,7 @@ jobs: origin-pr: ${{ github.event.pull_request.number }} destination-url: ${{ env.GITHUB_SERVER_URL }} destination-repo: user2/destinationrepo - destination-token: ${{ secrets.DESTINATION_TOKEN }} destination-branch: main - update: upgraded + destination-token: ${{ secrets.DESTINATION_TOKEN }} + update: ./upgraded debug: true