Skip to content

Commit

Permalink
Add workflow to auto update releaser workflows (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollonval authored Jun 19, 2023
1 parent e196307 commit edb1ae8
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/update-workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Update releaser worflows

on:
pull_request_target:
schedule:
- cron: '0 2 20 * *'

jobs:
releaser_workflows:
name: Update releaser workflows
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write

steps:
- name: Checkout
uses: actions/checkout@v3
- run: |
set -eux
wget https://github.com/jupyter-server/jupyter_releaser/blob/main/example-workflows/prep-release.yml
wget https://github.com/jupyter-server/jupyter_releaser/blob/main/example-workflows/publish-release.yml
working-directory: template/.github/workflows
- name: List files changed
id: files-changed
shell: bash -l {0}
run: |
set -ex
export CHANGES=$(git status --porcelain | tee /tmp/modified.log | wc -l)
cat /tmp/modified.log
echo "N_CHANGES=${CHANGES}" >> $GITHUB_OUTPUT
git diff
- name: Commit any changes
if: steps.files-changed.outputs.N_CHANGES != '0'
shell: bash -l {0}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git pull --no-tags
git add *
git commit -m "Automatic update of the releaser workflows"
git config push.default upstream
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit edb1ae8

Please sign in to comment.