Skip to content

Commit c6944ab

Browse files
authored
ci: avoid version check on autorelease snapshot (#9246)
When we change the version from non-snapshot to snapshot, we don't need to check the existence of snapshot. Such pull requests are labelled as "autorelease: snapshot"
1 parent 5527a6e commit c6944ab

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/versions.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ jobs:
3030
# have the duplicate versions in Maven Central
3131
existing-versions-check:
3232
runs-on: ubuntu-latest
33-
if: github.repository_owner == 'googleapis' && github.head_ref == 'release-please--branches--main'
33+
if: |
34+
github.repository_owner == 'googleapis' && github.head_ref == 'release-please--branches--main' &&
35+
(github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'autorelease: snapshot'))
3436
steps:
3537
- run: sudo apt-get update -y
3638
- run: sudo apt-get install libxml2-utils

0 commit comments

Comments
 (0)