mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-28 12:43:39 +08:00
infra: Automate SHA procedure during releases (#3424)
This commit is contained in:
3
.github/workflows/backport.yml
vendored
3
.github/workflows/backport.yml
vendored
@ -40,4 +40,5 @@ jobs:
|
|||||||
gh pr create --title "[$GITHUB_REF_NAME] $title" \
|
gh pr create --title "[$GITHUB_REF_NAME] $title" \
|
||||||
--body "Clean cherry-pick of #$NUMBER to the \`$GITHUB_REF_NAME\` branch." \
|
--body "Clean cherry-pick of #$NUMBER to the \`$GITHUB_REF_NAME\` branch." \
|
||||||
--head $branch \
|
--head $branch \
|
||||||
--base $GITHUB_REF_NAME
|
--base $GITHUB_REF_NAME \
|
||||||
|
--label backport
|
||||||
|
@ -14,7 +14,15 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CORE_REPO_SHA: main
|
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
|
||||||
|
# For PRs you can change the inner fallback ('main')
|
||||||
|
# For pushes you change the outer fallback ('main')
|
||||||
|
# The logic below is used during releases and depends on having an equivalent branch name in the core repo.
|
||||||
|
CORE_REPO_SHA: {% raw %}${{ github.event_name == 'pull_request' && (
|
||||||
|
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
|
||||||
|
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
|
||||||
|
'main'
|
||||||
|
) || 'main' }}{% endraw %}
|
||||||
CONTRIB_REPO_SHA: main
|
CONTRIB_REPO_SHA: main
|
||||||
PIP_EXISTS_ACTION: w
|
PIP_EXISTS_ACTION: w
|
||||||
|
|
||||||
|
@ -14,7 +14,15 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CORE_REPO_SHA: main
|
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
|
||||||
|
# For PRs you can change the inner fallback ('main')
|
||||||
|
# For pushes you change the outer fallback ('main')
|
||||||
|
# The logic below is used during releases and depends on having an equivalent branch name in the core repo.
|
||||||
|
CORE_REPO_SHA: {% raw %}${{ github.event_name == 'pull_request' && (
|
||||||
|
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
|
||||||
|
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
|
||||||
|
'main'
|
||||||
|
) || 'main' }}{% endraw %}
|
||||||
CONTRIB_REPO_SHA: main
|
CONTRIB_REPO_SHA: main
|
||||||
PIP_EXISTS_ACTION: w
|
PIP_EXISTS_ACTION: w
|
||||||
|
|
||||||
|
@ -14,7 +14,15 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CORE_REPO_SHA: main
|
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
|
||||||
|
# For PRs you can change the inner fallback ('main')
|
||||||
|
# For pushes you change the outer fallback ('main')
|
||||||
|
# The logic below is used during releases and depends on having an equivalent branch name in the core repo.
|
||||||
|
CORE_REPO_SHA: {% raw %}${{ github.event_name == 'pull_request' && (
|
||||||
|
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
|
||||||
|
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
|
||||||
|
'main'
|
||||||
|
) || 'main' }}{% endraw %}
|
||||||
CONTRIB_REPO_SHA: main
|
CONTRIB_REPO_SHA: main
|
||||||
PIP_EXISTS_ACTION: w
|
PIP_EXISTS_ACTION: w
|
||||||
|
|
||||||
|
10
.github/workflows/lint_0.yml
vendored
10
.github/workflows/lint_0.yml
vendored
@ -14,7 +14,15 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CORE_REPO_SHA: main
|
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
|
||||||
|
# For PRs you can change the inner fallback ('main')
|
||||||
|
# For pushes you change the outer fallback ('main')
|
||||||
|
# The logic below is used during releases and depends on having an equivalent branch name in the core repo.
|
||||||
|
CORE_REPO_SHA: ${{ github.event_name == 'pull_request' && (
|
||||||
|
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
|
||||||
|
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
|
||||||
|
'main'
|
||||||
|
) || 'main' }}
|
||||||
CONTRIB_REPO_SHA: main
|
CONTRIB_REPO_SHA: main
|
||||||
PIP_EXISTS_ACTION: w
|
PIP_EXISTS_ACTION: w
|
||||||
|
|
||||||
|
10
.github/workflows/misc_0.yml
vendored
10
.github/workflows/misc_0.yml
vendored
@ -14,7 +14,15 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CORE_REPO_SHA: main
|
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
|
||||||
|
# For PRs you can change the inner fallback ('main')
|
||||||
|
# For pushes you change the outer fallback ('main')
|
||||||
|
# The logic below is used during releases and depends on having an equivalent branch name in the core repo.
|
||||||
|
CORE_REPO_SHA: ${{ github.event_name == 'pull_request' && (
|
||||||
|
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
|
||||||
|
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
|
||||||
|
'main'
|
||||||
|
) || 'main' }}
|
||||||
CONTRIB_REPO_SHA: main
|
CONTRIB_REPO_SHA: main
|
||||||
PIP_EXISTS_ACTION: w
|
PIP_EXISTS_ACTION: w
|
||||||
|
|
||||||
|
@ -118,4 +118,5 @@ jobs:
|
|||||||
gh pr create --title "[$GITHUB_REF_NAME] $message" \
|
gh pr create --title "[$GITHUB_REF_NAME] $message" \
|
||||||
--body "$message." \
|
--body "$message." \
|
||||||
--head $branch \
|
--head $branch \
|
||||||
--base $GITHUB_REF_NAME
|
--base $GITHUB_REF_NAME \
|
||||||
|
--label prepare-release
|
||||||
|
@ -142,7 +142,8 @@ jobs:
|
|||||||
gh pr create --title "[$RELEASE_BRANCH_NAME] $message" \
|
gh pr create --title "[$RELEASE_BRANCH_NAME] $message" \
|
||||||
--body "$message." \
|
--body "$message." \
|
||||||
--head $branch \
|
--head $branch \
|
||||||
--base $RELEASE_BRANCH_NAME
|
--base $RELEASE_BRANCH_NAME \
|
||||||
|
--label prepare-release
|
||||||
|
|
||||||
create-pull-request-against-main:
|
create-pull-request-against-main:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -195,4 +196,5 @@ jobs:
|
|||||||
gh pr create --title "$message" \
|
gh pr create --title "$message" \
|
||||||
--body "$body" \
|
--body "$body" \
|
||||||
--head $branch \
|
--head $branch \
|
||||||
--base main
|
--base main \
|
||||||
|
--label prepare-release
|
||||||
|
3
.github/workflows/prepare-patch-release.yml
vendored
3
.github/workflows/prepare-patch-release.yml
vendored
@ -83,4 +83,5 @@ jobs:
|
|||||||
gh pr create --title "[$GITHUB_REF_NAME] $message" \
|
gh pr create --title "[$GITHUB_REF_NAME] $message" \
|
||||||
--body "$message." \
|
--body "$message." \
|
||||||
--head $branch \
|
--head $branch \
|
||||||
--base $GITHUB_REF_NAME
|
--base $GITHUB_REF_NAME \
|
||||||
|
--label prepare-release
|
||||||
|
6
.github/workflows/prepare-release-branch.yml
vendored
6
.github/workflows/prepare-release-branch.yml
vendored
@ -106,7 +106,8 @@ jobs:
|
|||||||
gh pr create --title "[$RELEASE_BRANCH_NAME] $message" \
|
gh pr create --title "[$RELEASE_BRANCH_NAME] $message" \
|
||||||
--body "$message." \
|
--body "$message." \
|
||||||
--head $branch \
|
--head $branch \
|
||||||
--base $RELEASE_BRANCH_NAME
|
--base $RELEASE_BRANCH_NAME \
|
||||||
|
--label prepare-release
|
||||||
|
|
||||||
create-pull-request-against-main:
|
create-pull-request-against-main:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -192,4 +193,5 @@ jobs:
|
|||||||
gh pr create --title "$message" \
|
gh pr create --title "$message" \
|
||||||
--body "$body" \
|
--body "$body" \
|
||||||
--head $branch \
|
--head $branch \
|
||||||
--base main
|
--base main \
|
||||||
|
--label prepare-release
|
||||||
|
10
.github/workflows/test_0.yml
vendored
10
.github/workflows/test_0.yml
vendored
@ -14,7 +14,15 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CORE_REPO_SHA: main
|
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
|
||||||
|
# For PRs you can change the inner fallback ('main')
|
||||||
|
# For pushes you change the outer fallback ('main')
|
||||||
|
# The logic below is used during releases and depends on having an equivalent branch name in the core repo.
|
||||||
|
CORE_REPO_SHA: ${{ github.event_name == 'pull_request' && (
|
||||||
|
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
|
||||||
|
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
|
||||||
|
'main'
|
||||||
|
) || 'main' }}
|
||||||
CONTRIB_REPO_SHA: main
|
CONTRIB_REPO_SHA: main
|
||||||
PIP_EXISTS_ACTION: w
|
PIP_EXISTS_ACTION: w
|
||||||
|
|
||||||
|
10
.github/workflows/test_1.yml
vendored
10
.github/workflows/test_1.yml
vendored
@ -14,7 +14,15 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CORE_REPO_SHA: main
|
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
|
||||||
|
# For PRs you can change the inner fallback ('main')
|
||||||
|
# For pushes you change the outer fallback ('main')
|
||||||
|
# The logic below is used during releases and depends on having an equivalent branch name in the core repo.
|
||||||
|
CORE_REPO_SHA: ${{ github.event_name == 'pull_request' && (
|
||||||
|
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
|
||||||
|
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
|
||||||
|
'main'
|
||||||
|
) || 'main' }}
|
||||||
CONTRIB_REPO_SHA: main
|
CONTRIB_REPO_SHA: main
|
||||||
PIP_EXISTS_ACTION: w
|
PIP_EXISTS_ACTION: w
|
||||||
|
|
||||||
|
10
.github/workflows/test_2.yml
vendored
10
.github/workflows/test_2.yml
vendored
@ -14,7 +14,15 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CORE_REPO_SHA: main
|
# Set the SHA to the branch name if the PR has a label 'prepare-release' or 'backport' otherwise, set it to 'main'
|
||||||
|
# For PRs you can change the inner fallback ('main')
|
||||||
|
# For pushes you change the outer fallback ('main')
|
||||||
|
# The logic below is used during releases and depends on having an equivalent branch name in the core repo.
|
||||||
|
CORE_REPO_SHA: ${{ github.event_name == 'pull_request' && (
|
||||||
|
contains(github.event.pull_request.labels.*.name, 'prepare-release') && github.event.pull_request.head.ref ||
|
||||||
|
contains(github.event.pull_request.labels.*.name, 'backport') && github.event.pull_request.base.ref ||
|
||||||
|
'main'
|
||||||
|
) || 'main' }}
|
||||||
CONTRIB_REPO_SHA: main
|
CONTRIB_REPO_SHA: main
|
||||||
PIP_EXISTS_ACTION: w
|
PIP_EXISTS_ACTION: w
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user