From 333a1dcea677253f51206e08b45b0bf51ce07b7c Mon Sep 17 00:00:00 2001 From: Erik Osterman Date: Fri, 8 Nov 2019 10:35:54 -0800 Subject: [PATCH 1/3] Fix auto-updates using bot token --- .github/workflows/auto-assign.yml | 2 +- .github/workflows/{label.yml => auto-label.yml} | 2 +- .github/workflows/auto-update.yml | 16 ++++++++-------- .github/workflows/branch-cleanup.yml | 14 -------------- 4 files changed, 10 insertions(+), 24 deletions(-) rename .github/workflows/{label.yml => auto-label.yml} (97%) delete mode 100644 .github/workflows/branch-cleanup.yml diff --git a/.github/workflows/auto-assign.yml b/.github/workflows/auto-assign.yml index d361ac4171..1758732a12 100644 --- a/.github/workflows/auto-assign.yml +++ b/.github/workflows/auto-assign.yml @@ -1,4 +1,4 @@ -name: 'Auto Assign' +name: 'auto-assign' on: pull_request jobs: diff --git a/.github/workflows/label.yml b/.github/workflows/auto-label.yml similarity index 97% rename from .github/workflows/label.yml rename to .github/workflows/auto-label.yml index a5f713344e..e8a3a293e9 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/auto-label.yml @@ -1,4 +1,4 @@ -name: Labeler +name: auto-label on: [pull_request] jobs: diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index 2cf3355cf8..755747955e 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -1,12 +1,12 @@ -name: Auto Updater +name: 'auto-update' # Enable `pull_request` for debugging -#on: [pull_request] +on: [pull_request] -on: - schedule: - # Update packages nightly - - cron: '0 0 * * *' +#on: +# schedule: +# # Update packages nightly +# - cron: '0 0 * * *' jobs: update-packages: @@ -16,7 +16,7 @@ jobs: - name: Update packages shell: bash env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + GITHUB_TOKEN: "${{ secrets.BOT_GITHUB_TOKEN }}" id: vars run: | make -C vendor auto-update RATE_LIMIT=0.5 @@ -26,7 +26,7 @@ jobs: - name: Create Pull Request uses: cloudposse/actions/github/create-pull-request@0.4.0 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} COMMIT_MESSAGE: update packages PULL_REQUEST_TITLE: Automated Package Updates PULL_REQUEST_BODY: This is an auto-generated PR with dependency updates. diff --git a/.github/workflows/branch-cleanup.yml b/.github/workflows/branch-cleanup.yml deleted file mode 100644 index 61a9f83456..0000000000 --- a/.github/workflows/branch-cleanup.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: branch-cleanup -on: - pull_request: - branches: - - master -jobs: - cleanup-branch: - name: auto delete branch on merge - runs-on: ubuntu-latest - steps: - - uses: cloudposse/actions/github/branch-cleanup@0.3.0 - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - NO_BRANCH_DELETED_EXIT_CODE: 0 From bd38db12280a40a001a45c39428fb27ec863d61e Mon Sep 17 00:00:00 2001 From: Erik Osterman Date: Fri, 8 Nov 2019 10:42:18 -0800 Subject: [PATCH 2/3] restore cron --- .github/workflows/auto-update.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index 755747955e..3de0e4fa9a 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -1,12 +1,12 @@ name: 'auto-update' # Enable `pull_request` for debugging -on: [pull_request] +#on: [pull_request] -#on: -# schedule: -# # Update packages nightly -# - cron: '0 0 * * *' +on: + schedule: + # Update packages nightly + - cron: '0 0 * * *' jobs: update-packages: From 3fdbcf6f4518b46ea21190c73a14f573143dbe5c Mon Sep 17 00:00:00 2001 From: Erik Osterman Date: Fri, 8 Nov 2019 10:46:29 -0800 Subject: [PATCH 3/3] Rename to GITHUB_BOT_TOKEN --- .github/workflows/auto-update.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index 3de0e4fa9a..4dc7de6535 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -16,7 +16,7 @@ jobs: - name: Update packages shell: bash env: - GITHUB_TOKEN: "${{ secrets.BOT_GITHUB_TOKEN }}" + GITHUB_TOKEN: "${{ secrets.GITHUB_BOT_TOKEN }}" id: vars run: | make -C vendor auto-update RATE_LIMIT=0.5 @@ -26,7 +26,7 @@ jobs: - name: Create Pull Request uses: cloudposse/actions/github/create-pull-request@0.4.0 env: - GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_BOT_TOKEN }} COMMIT_MESSAGE: update packages PULL_REQUEST_TITLE: Automated Package Updates PULL_REQUEST_BODY: This is an auto-generated PR with dependency updates.