From ac2ddcf84735fbd51986acfb88cb01b43c6fe090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9?= Date: Mon, 22 Jul 2024 12:03:24 +0200 Subject: [PATCH] add manual dependabot trigger workflow --- .github/workflows/manual-dependabot.yml | 44 +++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/manual-dependabot.yml diff --git a/.github/workflows/manual-dependabot.yml b/.github/workflows/manual-dependabot.yml new file mode 100644 index 00000000..de542c04 --- /dev/null +++ b/.github/workflows/manual-dependabot.yml @@ -0,0 +1,44 @@ +name: ManualDependabot + +on: + workflow_dispatch: + inputs: + package-manager: + description: 'The package manager to use' + required: true + default: 'gomod' + directory: + description: 'The directory to scan' + required: true + default: '/' + +permissions: + contents: read + +jobs: + dependabot: + permissions: + contents: write # for Git to git push + pull-requests: write # for repo-sync/pull-request to create pull requests + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Checkout dependabot + run: | + cd /tmp/ + git clone https://github.com/dependabot/dependabot-script + + - name: Build image + run: | + cd /tmp/dependabot-script + docker build -t "dependabot/dependabot-script" -f Dockerfile . + + - name: Run dependabot + env: + PACKAGE_MANAGER: ${{ github.event.inputs.package-manager }} + DIRECTORY: ${{ github.event.inputs.directory }} + GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + docker run -v $PWD:/src -e PROJECT_PATH=$GITHUB_REPOSITORY -e PACKAGE_MANAGER=$PACKAGE_MANAGER -e DIRECTORY=$DIRECTORY -e GITHUB_ACCESS_TOKEN=$GITHUB_ACCESS_TOKEN -e OPTIONS="$OPTIONS" dependabot/dependabot-script