This repository has been archived by the owner on May 3, 2024. It is now read-only.
chore(workflows): fix PR labeler config #492
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: '[Release step 2 | automatic] Tag Release' | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- main | |
- 5.x.x | |
jobs: | |
release-step-2_automatic_tag-release: | |
name: Tagging release | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.merged && ( github.head_ref == 'prepare-release-for-main' || github.head_ref == 'prepare-release-for-5.x.x' ) && (github.base_ref == 'main' || github.base_ref == '5.x.x') | |
steps: | |
- uses: actions/checkout@v4 | |
- name: get commit message | |
id: get-commit-message | |
shell: bash | |
run: | | |
commitmessage=$(git log --format=%s -n 1 ${{ github.event.after }}) | |
echo "message="\"$commitmessage"\"" >> $GITHUB_OUTPUT | |
echo ${{ steps.get-commit-message.outputs.message }} | |
- name: get tag version | |
id: get-tag-version | |
run: | | |
echo "tagversion=$( egrep -o '([0-9]+\.){2}(\*|[0-9]+)(-\S*)?' <<< ${{ steps.get-commit-message.outputs.message }} )" >> $GITHUB_OUTPUT | |
echo v${{ steps.get-tag-version.outputs.tagversion }} | |
- name: set tag version | |
id: set-tag-version | |
run: | | |
git config --local user.email "one.amex@aexp.com" | |
git config --local user.name "OneAmexBot" | |
echo ${{ steps.get-tag-version.outputs.tagversion }} | |
git tag v${{ steps.get-tag-version.outputs.tagversion }} | |
git push origin --tags | |
echo "action_tag=v${{ steps.get-tag-version.outputs.tagversion }}" >> $GITHUB_OUTPUT | |
- name: Trigger Image Publishing | |
uses: octokit/request-action@v2.x | |
id: dispatch_release-step-3_automatic_prepare-docker-tags | |
with: | |
route: POST /repos/:repository/dispatches | |
repository: ${{ github.repository }} | |
mediaType: '{"previews": ["everest"]}' | |
event_type: "release-step-3_automatic_prepare-docker-tags" | |
client_payload: '{"tagversion": "${{ steps.set-tag-version.outputs.action_tag }}"}' | |
env: | |
GITHUB_TOKEN: ${{ secrets.PA_TOKEN }} |