Skip to content

[WIP] Add workflow to update dependency using dependabot-script #2

[WIP] Add workflow to update dependency using dependabot-script

[WIP] Add workflow to update dependency using dependabot-script #2

Workflow file for this run

#
# Copyright (C) 2019-2024 vdaas.org vald team <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Run Dependabot
on:
pull_request:
workflow_dispatch:
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:
- uses: actions/checkout@v4
- 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: gradle
# GITHUB_ACCESS_TOKEN: ${{ github.token }}
run: |
# docker run -v $PWD:/src -e PROJECT_PATH=$GITHUB_REPOSITORY -e PACKAGE_MANAGER=$PACKAGE_MANAGER -e DIRECTORY=src -e GITHUB_ACCESS_TOKEN=$GITHUB_ACCESS_TOKEN -e OPTIONS="$OPTIONS" dependabot/dependabot-script
docker run -v $PWD:/src -e PROJECT_PATH=$GITHUB_REPOSITORY -e PACKAGE_MANAGER=$PACKAGE_MANAGER -e DIRECTORY=src dependabot/dependabot-script
git diff && git diff --name-only && git status