Pārlūkot izejas kodu

feat: auto-update dependencies

Signed-off-by: Moritz Johner <beller.moritz@googlemail.com>
Moritz Johner 3 gadi atpakaļ
vecāks
revīzija
fec4bfcb6c
1 mainītis faili ar 40 papildinājumiem un 0 dzēšanām
  1. 40 0
      .github/workflows/update-deps.yml

+ 40 - 0
.github/workflows/update-deps.yml

@@ -0,0 +1,40 @@
+name: "Update dependencies"
+on:
+  push:
+    branches:
+      - mj-auto-update-deps
+
+  schedule:
+    # Sunday, 1PM UTC
+  - cron: "0 13 * * 0"
+
+jobs:
+  stale:
+    runs-on: ubuntu-latest
+    steps:
+    - name: Setup Go
+      uses: actions/setup-go@v3
+      with:
+        go-version: "1.19"
+    - name: Generate token
+      id: generate_token
+      uses: tibdex/github-app-token@v1
+      with:
+        app_id: ${{ secrets.APP_ID }}
+        private_key: ${{ secrets.PRIVATE_KEY }}
+    - uses: actions/checkout@v2
+      with:
+        token: ${{ steps.generate_token.outputs.token }}
+    - name: create pull request
+      run: |
+        git config --global user.email "ExternalSecretsOperator@users.noreply.github.com"
+        git config --global user.name "External Secrets Operator"
+        BRANCH=update-deps-$(date "+%s")
+        make update-deps
+        git checkout -b $BRANCH
+        git add -A
+        git commit -m "update dependencies" -s
+        git push origin $BRANCH
+        gh pr create -B main -H ${BRANCH} --title 'chore: update dependencies' --body 'Created by Github action'
+      env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}