enh(release): push plugins release tag (#4623)

Refs: MON-20486
This commit is contained in:
Kevin Duret 2023-09-05 10:29:03 +02:00 committed by GitHub
parent c53950ee4d
commit 01b8384283
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 2 deletions

View File

@ -149,3 +149,28 @@ jobs:
nexus_password: ${{ secrets.nexus_password }} nexus_password: ${{ secrets.nexus_password }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }}
stability: ${{ inputs.stability }} stability: ${{ inputs.stability }}
release-tag:
if: ${{ inputs.stability == 'stable' && github.event_name == 'push' }}
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Push git release tag
run: |
RELEASE=plugins-$(date '+%Y%m%d')
EXISTING_TAG=$(git tag --list "$RELEASE" | head -n 1)
git config --global user.email "release@centreon.com"
git config --global user.name "Centreon"
if [ -z "$EXISTING_TAG" ]; then
git tag -a "$RELEASE" -m "release $RELEASE"
git push --follow-tags
else
echo "::warning::Release tag $RELEASE already exists"
fi
shell: bash

View File

@ -19,8 +19,6 @@ on:
- '.github/workflows/plugins.yml' - '.github/workflows/plugins.yml'
- 'src/**' - 'src/**'
- 'packaging/**' - 'packaging/**'
tags:
- centreon-plugins-*
jobs: jobs:
get-environment: get-environment: