Merge pull request #7 from geekcell/container-insights-log-group #13
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
--- | |
##################### | |
## Create releases ## | |
##################### | |
# | |
# Documentation: | |
# https://help.github.com/en/articles/workflow-syntax-for-github-actions | |
# | |
name: Release | |
on: | |
push: | |
branches: [ main ] | |
tags: [ 'v*.*.*' ] | |
pull_request: | |
types: [ labeled ] | |
################# | |
# Start the job # | |
################# | |
jobs: | |
############### | |
# Steps below # | |
############### | |
create-release: | |
name: Create Release | |
if: github.event.action != 'labeled' | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
############################ | |
# Checkout the source code # | |
############################ | |
- name: Checkout Code | |
uses: actions/checkout@v3.1.0 | |
################################### | |
# Bump version depending on label # | |
################################### | |
- name: Bump version | |
if: "!startsWith(github.ref, 'refs/tags/')" | |
id: bumpr | |
uses: haya14busa/action-bumpr@v1 | |
################### | |
# Update the tags # | |
################### | |
- name: Update tag | |
if: "!steps.bumpr.outputs.skip" | |
uses: haya14busa/action-update-semver@v1 | |
with: | |
tag: ${{ steps.bumpr.outputs.next_version }} | |
################ | |
# Get tag name # | |
################ | |
- name: Get tag name | |
id: tag | |
uses: haya14busa/action-cond@v1 | |
with: | |
cond: "${{ startsWith(github.ref, 'refs/tags/') }}" | |
if_true: ${{ github.ref }} | |
if_false: ${{ steps.bumpr.outputs.next_version }} | |
################## | |
# Create release # | |
################## | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
if: "steps.tag.outputs.value != ''" | |
with: | |
name: Release ${{ steps.tag.outputs.value }} | |
body: ${{ steps.bumpr.outputs.message }} | |
tag_name: ${{ steps.tag.outputs.value }} | |
draft: false | |
prerelease: false | |
########################### | |
# Release preview comment # | |
########################### | |
release-check: | |
if: github.event.action == 'labeled' | |
runs-on: ubuntu-latest | |
steps: | |
############################ | |
# Checkout the source code # | |
############################ | |
- name: Checkout Code | |
uses: actions/checkout@v3.1.0 | |
####################### | |
# Post status comment # | |
####################### | |
- name: Post bumpr status comment | |
uses: haya14busa/action-bumpr@v1 |