-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Setup Weekly Automation to Update @actions/github #498
Changes from all commits
fa0bc4f
a682b0c
aa926eb
49e3194
53076d8
73322dd
d514d28
e1f7901
8bb8112
60e89f8
2617c16
0003a9e
b28ec48
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: "UpdateOctokit" | ||
|
||
on: | ||
schedule: | ||
- cron: '0 18 * * 0' # sunday at 18 UTC | ||
|
||
jobs: | ||
UpdateOctokit: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.repository_owner == 'actions' }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Update Octokit | ||
working-directory: packages/github | ||
run: | | ||
npx npm-check-updates -u --dep prod | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
npm install | ||
- name: Check Status | ||
id: status | ||
working-directory: packages/github | ||
run: | | ||
if [[ "$(git status --porcelain)" != "" ]]; then | ||
echo "::set-output name=createPR::true" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --global user.name "github-actions[bot]" | ||
git checkout -b bots/updateGitHubDependencies-${{github.run_number}} | ||
git add . | ||
git commit -m "Update Dependencies" | ||
git push --set-upstream origin bots/updateGitHubDependencies-${{github.run_number}} | ||
fi | ||
- name: Create PR | ||
if: ${{steps.status.outputs.createPR}} | ||
uses: actions/github-script@v2 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fyi, it looks like you could omit |
||
script: | | ||
github.pulls.create( | ||
{ | ||
base: "master", | ||
owner: "${{github.repository_owner}}", | ||
repo: "toolkit", | ||
title: "Update Octokit dependencies", | ||
body: "Update Octokit dependencies", | ||
head: "bots/updateGitHubDependencies-${{github.run_number}}" | ||
}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,10 +38,10 @@ | |
"url": "https://github.com/actions/toolkit/issues" | ||
}, | ||
"dependencies": { | ||
"@actions/http-client": "^1.0.3", | ||
"@octokit/core": "^2.5.1", | ||
"@octokit/plugin-paginate-rest": "^2.2.0", | ||
"@octokit/plugin-rest-endpoint-methods": "^3.10.0" | ||
"@actions/http-client": "^1.0.8", | ||
"@octokit/core": "^3.0.0", | ||
"@octokit/plugin-paginate-rest": "^2.2.3", | ||
"@octokit/plugin-rest-endpoint-methods": "^4.0.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lots of changes to actions api here, going to release a new major version: |
||
}, | ||
"devDependencies": { | ||
"jest": "^25.1.0", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will forks inherit this cron workflow? Should we add a job-condition so it doesnt run on forks?