Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto Release Robottelo #11365

Merged
merged 1 commit into from
May 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/dispatch_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
### The auto release workflow triggered through dispatch request from CI
name: auto-release

# Run on workflow dispatch from CI
on:
workflow_dispatch:
inputs:
tag_name:
type: string
description: Name of the tag

jobs:
auto-tag-and-release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Git User setup
run: "git config --local user.email Satellite-QE.satqe.com && git config --local user.name Satellite-QE"

- name: Tag latest commit
run: "git tag -a ${{ github.event.inputs.tag_name }} -m 'Tagged By SatelliteQE Automation User'"

- name: Push the tag to the upstream
run: "git push ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git --tags"

- name: create a new release from the tag

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just of consistencyCreate a new release from the tag

env:
credentials: ${{ secrets.GH_TOKEN }}
run: "curl -L -X POST -H \"Authorization: Bearer ${{ secrets.SATQE_GH_TOKEN }}\" ${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases -d '{\"tag_name\": \"${{ github.event.inputs.tag_name }}\", \"target_commitish\":\"master\", \"name\":\"${{ github.event.inputs.tag_name }}\", \"draft\":false, \"prerelease\":true, \"generate_release_notes\": true}'"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a check here that the release was successful, if not add a slack notification.