Skip to content

Commit 1631bb9

Browse files
committed
trying sha-automation
Signed-off-by: emdneto <[email protected]>
1 parent e5a9307 commit 1631bb9

File tree

11 files changed

+48
-12
lines changed

11 files changed

+48
-12
lines changed

.github/workflows/backport.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ jobs:
4040
gh pr create --title "[$GITHUB_REF_NAME] $title" \
4141
--body "Clean cherry-pick of #$NUMBER to the \`$GITHUB_REF_NAME\` branch." \
4242
--head $branch \
43-
--base $GITHUB_REF_NAME
43+
--base $GITHUB_REF_NAME \
44+
--label patch-release

.github/workflows/contrib.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@ jobs:
1515
uses: open-telemetry/opentelemetry-python-contrib/.github/workflows/core_contrib_test_0.yml@main
1616
with:
1717
CORE_REPO_SHA: ${{ github.sha }}
18-
CONTRIB_REPO_SHA: main
18+
CONTRIB_REPO_SHA: ${{ github.event_name == 'pull_request' && (
19+
contains(github.event.pull_request.labels.*.name, 'release') && github.event.pull_request.head.ref ||
20+
contains(github.event.pull_request.labels.*.name, 'patch-release') && github.event.pull_request.base.ref ||
21+
'main'
22+
) || 'main' }}

.github/workflows/lint_0.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ concurrency:
1515

1616
env:
1717
CORE_REPO_SHA: main
18-
CONTRIB_REPO_SHA: main
18+
CONTRIB_REPO_SHA: ${{ github.event_name == 'pull_request' && (
19+
contains(github.event.pull_request.labels.*.name, 'release') && github.event.pull_request.head.ref ||
20+
contains(github.event.pull_request.labels.*.name, 'patch-release') && github.event.pull_request.base.ref ||
21+
'main'
22+
) || 'main' }}
1923
PIP_EXISTS_ACTION: w
2024

2125
jobs:

.github/workflows/misc_0.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ concurrency:
1515

1616
env:
1717
CORE_REPO_SHA: main
18-
CONTRIB_REPO_SHA: main
18+
CONTRIB_REPO_SHA: ${{ github.event_name == 'pull_request' && (
19+
contains(github.event.pull_request.labels.*.name, 'release') && github.event.pull_request.head.ref ||
20+
contains(github.event.pull_request.labels.*.name, 'patch-release') && github.event.pull_request.base.ref ||
21+
'main'
22+
) || 'main' }}
1923
PIP_EXISTS_ACTION: w
2024

2125
jobs:

.github/workflows/prepare-patch-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,5 @@ jobs:
7777
gh pr create --title "[$GITHUB_REF_NAME] $message" \
7878
--body "$message." \
7979
--head $branch \
80-
--base $GITHUB_REF_NAME
80+
--base $GITHUB_REF_NAME \
81+
--label release

.github/workflows/prepare-release-branch.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ jobs:
103103
gh pr create --title "[$RELEASE_BRANCH_NAME] $message" \
104104
--body "$message." \
105105
--head $branch \
106-
--base $RELEASE_BRANCH_NAME
106+
--base $RELEASE_BRANCH_NAME \
107+
--label release
107108
108109
create-pull-request-against-main:
109110
runs-on: ubuntu-latest
@@ -183,4 +184,5 @@ jobs:
183184
gh pr create --title "$message" \
184185
--body "$body" \
185186
--head $branch \
186-
--base main
187+
--base main \
188+
--label release

.github/workflows/templates/lint.yml.j2

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ concurrency:
1515

1616
env:
1717
CORE_REPO_SHA: main
18-
CONTRIB_REPO_SHA: main
18+
CONTRIB_REPO_SHA: {% raw %}${{ github.event_name == 'pull_request' && (
19+
contains(github.event.pull_request.labels.*.name, 'release') && github.event.pull_request.head.ref ||
20+
contains(github.event.pull_request.labels.*.name, 'patch-release') && github.event.pull_request.base.ref ||
21+
'main'
22+
) || 'main' }}{% endraw %}
1923
PIP_EXISTS_ACTION: w
2024

2125
jobs:

.github/workflows/templates/misc.yml.j2

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ concurrency:
1515

1616
env:
1717
CORE_REPO_SHA: main
18-
CONTRIB_REPO_SHA: main
18+
CONTRIB_REPO_SHA: {% raw %}${{ github.event_name == 'pull_request' && (
19+
contains(github.event.pull_request.labels.*.name, 'release') && github.event.pull_request.head.ref ||
20+
contains(github.event.pull_request.labels.*.name, 'patch-release') && github.event.pull_request.base.ref ||
21+
'main'
22+
) || 'main' }}{% endraw %}
1923
PIP_EXISTS_ACTION: w
2024

2125
jobs:

.github/workflows/templates/test.yml.j2

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ concurrency:
1515

1616
env:
1717
CORE_REPO_SHA: main
18-
CONTRIB_REPO_SHA: main
18+
CONTRIB_REPO_SHA: {% raw %}${{ github.event_name == 'pull_request' && (
19+
contains(github.event.pull_request.labels.*.name, 'release') && github.event.pull_request.head.ref ||
20+
contains(github.event.pull_request.labels.*.name, 'patch-release') && github.event.pull_request.base.ref ||
21+
'main'
22+
) || 'main' }}{% endraw %}
1923
PIP_EXISTS_ACTION: w
2024

2125
jobs:

.github/workflows/test_0.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ concurrency:
1515

1616
env:
1717
CORE_REPO_SHA: main
18-
CONTRIB_REPO_SHA: main
18+
CONTRIB_REPO_SHA: ${{ github.event_name == 'pull_request' && (
19+
contains(github.event.pull_request.labels.*.name, 'release') && github.event.pull_request.head.ref ||
20+
contains(github.event.pull_request.labels.*.name, 'patch-release') && github.event.pull_request.base.ref ||
21+
'main'
22+
) || 'main' }}
1923
PIP_EXISTS_ACTION: w
2024

2125
jobs:

0 commit comments

Comments
 (0)