Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix update releaser workflows #24

Merged
merged 5 commits into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions .github/workflows/update-workflows.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Update releaser worflows

on:
pull_request_target:
workflow_dispatch:
schedule:
- cron: '0 2 21 * *'
# Monthly on the 23th
- cron: '0 2 23 * *'

jobs:
releaser_workflows:
Expand All @@ -19,8 +20,8 @@ jobs:
uses: actions/checkout@v3
- run: |
set -eux
wget -O prep-release.yml https://github.com/jupyter-server/jupyter_releaser/blob/main/example-workflows/prep-release.yml
wget -O publish-release.yml https://github.com/jupyter-server/jupyter_releaser/blob/main/example-workflows/publish-release.yml
wget -O prep-release.yml https://raw.githubusercontent.com/jupyter-server/jupyter_releaser/main/example-workflows/prep-release.yml
wget -O publish-release.yml https://raw.githubusercontent.com/jupyter-server/jupyter_releaser/main/example-workflows/publish-release.yml
working-directory: template/.github/workflows

- name: List files changed
Expand All @@ -44,10 +45,18 @@ jobs:

git pull --no-tags

export SHA=$(git rev-parse --short HEAD)
export BRANCH_NAME=new-releaser-workflows-${SHA}
git checkout -b "${BRANCH_NAME}"

# Needed for hub to create the pull request correctly
# Ref: https://github.com/github/hub/issues/1538 https://github.com/github/hub/pull/1705
git remote set-head origin --auto

git add *
git commit -m "Automatic update of the releaser workflows"

git config push.default upstream
git push
git push --set-upstream origin "${BRANCH_NAME}"
hub pull-request -b "main" -m "Updated releaser workflows available at ${SHA}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1,892 changes: 42 additions & 1,850 deletions template/.github/workflows/prep-release.yml

Large diffs are not rendered by default.

1,849 changes: 0 additions & 1,849 deletions template/.github/workflows/prep-release.yml.1

This file was deleted.

1,849 changes: 0 additions & 1,849 deletions template/.github/workflows/prep-release.yml.2

This file was deleted.

1,970 changes: 54 additions & 1,916 deletions template/.github/workflows/publish-release.yml

Large diffs are not rendered by default.

1,915 changes: 0 additions & 1,915 deletions template/.github/workflows/publish-release.yml.1

This file was deleted.

1,915 changes: 0 additions & 1,915 deletions template/.github/workflows/publish-release.yml.2

This file was deleted.

Loading