Skip to content
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
16 changes: 15 additions & 1 deletion .github/workflows/updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ on:
type: string
required: false
default: 'ubuntu-latest'
pr-strategy:
description: |
How to handle PRs - can be either of the following:
* create - create a new PR for new dependency versions as they are released - maintainers may merge or close older PRs manually
* update - keep a single PR that gets updated with new dependency versions until merged - only the latest version update is available at any time
type: string
required: false
default: create
_workflow_version:
description: 'Internal: specify github-workflows (this repo) revision to use when checking out scripts.'
type: string
Expand Down Expand Up @@ -117,7 +125,13 @@ jobs:
$mainBranch = $(git remote show origin | Select-String "HEAD branch: (.*)").Matches[0].Groups[1].Value
Write-Host '::echo::on'
Write-Host "::set-output name=baseBranch::$mainBranch"
Write-Host "::set-output name=prBranch::deps/${{ inputs.path }}/${{ steps.target.outputs.latestTag }}"
$prBranch = switch ('${{ inputs.pr-strategy }}')
{
'create' { 'deps/${{ inputs.path }}/${{ steps.target.outputs.latestTag }}' }
'update' { 'deps/${{ inputs.path }}' }
default { throw "Unkown PR strategy '${{ inputs.pr-strategy }}'." }
}
Write-Host "::set-output name=prBranch::$prBranch"
- name: Fetch an existing PR
if: steps.target.outputs.latestTag != steps.target.outputs.originalTag
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/workflow-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
path: tests/sentry-cli.properties
name: CLI
pattern: '^2\.0\.'
pr-strategy: update
_workflow_version: ${{ github.sha }}
secrets:
api-token: ${{ github.token }}
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ jobs:
* type: string
* required: false
* default: ubuntu-latest
* `pr-strategy`: How to handle PRs.
Can be either of the following:
* `create` (default) - create a new PR for new dependency versions as they are released - maintainers may merge or close older PRs manually
* `update` - keep a single PR that gets updated with new dependency versions until merged - only the latest version update is available at any time


### Secrets

Expand Down