Skip to content

Commit

Permalink
Fix dependabot error
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Jiao <[email protected]>
  • Loading branch information
Yang Jiao committed May 10, 2023
1 parent 7ce41ec commit db25ec3
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@ updates:
reviewers:
- "OrlinVasilev"

- package-ecosystem: "gomod"
directory: "/src"
schedule:
interval: "weekly"
labels:
- "release-note/update"

# - package-ecosystem: "gomod"
# directory: "/src"
# schedule:
# interval: "weekly"
# labels:
# - "release-note/update"
# ignore:
# - dependency-name: "gopkg.in/h2non/gock.v1"
# - dependency-name: "github.com/goharbor/harbor/src/server/v2.0/restapi/operations/user"
# - dependency-name: "github.com/theupdateframework/notary"
# - dependency-name: "github.com/go-openapi/runtime"

# More will be needed
42 changes: 42 additions & 0 deletions .github/workflows/manual-github-actions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: ManualDependabot

on:
workflow_dispatch:

permissions:
contents: read

jobs:
dependabot:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Generate API
run: |
make gen_apis
pwd=$(pwd)
echo "DIRECTORY_PATH=$(echo $pwd/src)" >> $GITHUB_ENV
- 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:
# Select your package manager
PACKAGE_MANAGER: go_modules
DIRECTORY_PATH: /src
OPTIONS: |
{ "tidy": true, "vendor": true, "labeler": "release-note/ignore-for-release" }
GITHUB_ACCESS_TOKEN: ${{ github.token }}
run: |
echo $PWD
ls
docker run -v $PWD:/harbor -e PROJECT_PATH=$GITHUB_REPOSITORY -e PACKAGE_MANAGER=$PACKAGE_MANAGER -e DIRECTORY_PATH=$DIRECTORY_PATH -e DIRECTORY=harbor -e GITHUB_ACCESS_TOKEN=$GITHUB_ACCESS_TOKEN -e OPTIONS="$OPTIONS" dependabot/dependabot-script

0 comments on commit db25ec3

Please sign in to comment.