This is an automated email from the ASF dual-hosted git repository.
damccorm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 1b3c7b1f696 Fix finalize_release (#29391)
1b3c7b1f696 is described below
commit 1b3c7b1f696feab0dc3afa6aa2c8cae0c049e22d
Author: Danny McCormick <[email protected]>
AuthorDate: Fri Nov 17 11:22:33 2023 -0800
Fix finalize_release (#29391)
* WIP: Fix finalize_release
* Try fixing broken parts
* Correctly prefix RC tag
* Setup git config for tagging release
* Add message
* Add signing key
* Sign using local user instead of github default
* Give bot permission to push tags
---
.github/workflows/finalize_release.yml | 28 +++++++++++++++++++++++-----
1 file changed, 23 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/finalize_release.yml
b/.github/workflows/finalize_release.yml
index cb1d9571a34..ef901bdc68b 100644
--- a/.github/workflows/finalize_release.yml
+++ b/.github/workflows/finalize_release.yml
@@ -36,16 +36,25 @@ env:
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
+permissions:
+ contents: write
+ pull-requests: write
+
jobs:
push_docker_artifacts:
if: ${{github.event.inputs.PUSH_DOCKER_ARTIFACTS == 'yes'}}
runs-on: [self-hosted, ubuntu-20.04, main]
steps:
+ - name: Login to Docker Hub
+ uses: docker/login-action@v2
+ with:
+ username: ${{ secrets.DOCKERHUB_USER }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Publish to Docker
env:
RELEASE: "${{ github.event.inputs.RELEASE }}"
RC_NUM: "${{ github.event.inputs.RC }}"
- RC_VERSION: "rc_${{ github.event.inputs.RC }}"
+ RC_VERSION: "rc${{ github.event.inputs.RC }}"
run: |
echo "Publish SDK docker images to Docker Hub."
@@ -121,21 +130,30 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
+ - name: Set git config
+ run: |
+ git config user.name $GITHUB_ACTOR
+ git config user.email actions@"$RUNNER_NAME".local
+ - name: Import GPG key
+ id: import_gpg
+ uses:
crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549
+ with:
+ gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Push tags
env:
VERSION_TAG: "v${{ github.event.inputs.RELEASE }}"
- RC_TAG: "${{ github.event.inputs.RELEASE }}-RC${{
github.event.inputs.RC }}"
+ RC_TAG: "v${{ github.event.inputs.RELEASE }}-RC${{
github.event.inputs.RC }}"
run: |
# Ensure local tags are in sync. If there's a mismatch, it will tell
you.
- git fetch --all --tags
+ git fetch --all --tags --prune
# If the tag exists, a commit number is produced, otherwise there's an
error.
git rev-list $RC_TAG -n 1
# Tag for Go SDK
- git tag -s "sdks/$VERSION_TAG" "$RC_TAG"
+ git tag "sdks/$VERSION_TAG" "$RC_TAG" -m "Tagging release"
--local-user="${{steps.import_gpg.outputs.name}}"
git push https://github.com/apache/beam "sdks/$VERSION_TAG"
# Tag for repo root.
- git tag -s "$VERSION_TAG" "$RC_TAG"
+ git tag "$VERSION_TAG" "$RC_TAG" -m "Tagging release"
--local-user="${{steps.import_gpg.outputs.name}}"
git push https://github.com/apache/beam "$VERSION_TAG"