Skip to content

Revert "Release galaxy-2.3.0" #54

Revert "Release galaxy-2.3.0"

Revert "Release galaxy-2.3.0" #54

Workflow file for this run

# SPDX-License-Identifier: GPL-3.0-only
# SPDX-FileCopyrightText: 2023 Red Hat, Project Atmosphere
#
# Copyright 2023 Red Hat, Project Atmosphere
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# You should have received a copy of the GNU General Public License along with this program.
# If not, see <https://www.gnu.org/licenses/>.
name: Push version tag
on:
pull_request_target:
types: [ closed ]
branches:
- main
- galaxy
jobs:
tag-main:
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.base.ref }}
- name: Tag repo with collection version
run: |
git config user.name github-actions
git config user.email [email protected]
export COLLECTION_VERSION="$(cat galaxy.yml | grep '^version:' | awk '{print $2}')"
export RELEASE_TAG="main-$COLLECTION_VERSION"
git fetch --tags
if (git tag | grep "${RELEASE_TAG}");
then
echo "Tag ${RELEASE_TAG} already exists"
exit 0
fi
echo "Tag ${RELEASE_TAG} does not exists"
git tag -a "${RELEASE_TAG}" -m "Release ${RELEASE_TAG}"
git push origin "${RELEASE_TAG}"
tag-galaxy:
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'galaxy'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.base.ref }}
- name: Tag repo with collection version
run: |
git config user.name github-actions
git config user.email [email protected]
export COLLECTION_VERSION="$(cat galaxy.yml | grep '^version:' | awk '{print $2}')"
export RELEASE_TAG="galaxy-$COLLECTION_VERSION"
git fetch --tags
if (git tag | grep "${RELEASE_TAG}");
then
echo "Tag ${RELEASE_TAG} already exists"
exit 0
fi
echo "Tag ${RELEASE_TAG} does not exists"
git tag -a "${RELEASE_TAG}" -m "Release ${RELEASE_TAG}"
git push origin "${RELEASE_TAG}"