Skip to content

Merge branch 'v1/dev' into v1/stable #90

Merge branch 'v1/dev' into v1/stable

Merge branch 'v1/dev' into v1/stable #90

Workflow file for this run

name: MKP-Release
on:
workflow_dispatch:
push:
branches:
- 'v1/stable'
jobs:
build_v2:
name: Build Robotmk MKP
runs-on: ubuntu-latest
container:
image: checkmk/check-mk-raw:2.3.0-latest
env:
OMD_ROOT: /omd/sites/cmk
OMD_SITE: cmk
CMK_SITE_ID: cmk
WORKSPACE: ${{ github.workspace }}
steps:
- name: Install tools
run: apt update && apt-get -y install sudo jq tree hub
- name: Create Checkmk Site
run: /docker-entrypoint.sh /bin/true
- name: Checkout Robotmk repository
uses: actions/checkout@v2
- name: Link repository files into container
run: .devcontainer/linkfiles.sh
- name: Update GITHUB_PATH
run: echo "/omd/sites/cmk/bin" >> $GITHUB_PATH
# Uncomment this to debug
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: Build MKP
run: .devcontainer/build.sh
id: cmkpkg
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ${{ steps.cmkpkg.outputs.artifactname }}
path: ${{ steps.cmkpkg.outputs.pkgfile }}
# ////////////////////////////////////////////////////////////////////////
# https://docs.github.com/en/actions/guides/storing-workflow-data-as-artifacts#downloading-or-deleting-artifacts
release:
name: Release Robotmk MKP
runs-on: ubuntu-latest
needs:
# - build_v1
- build_v2
env:
WORKSPACE: ${{ github.workspace }}
steps:
- name: Install tools
run: apt update && apt-get -y install hub
- name: Checkout Robotmk repository
uses: actions/checkout@v2
- name: Download CMK1/2 artifact
uses: actions/download-artifact@v2
with:
# download dir
path: package
- name: Debug - Show downloaded content
run: ls -la package/*
- name: Show ref
run: echo ${GITHUB_REF##*/}
- name: curl chag
uses: wei/curl@master
with:
args: https://raw.githubusercontent.com/mtdowling/chag/master/chag --output chag
- name: chag
run: bash chag contents > RELEASE_CHANGELOG.md
- name: Get Tag
id: tag
run: echo ::set-output name=VERSION::${GITHUB_REF##*/}
# (The Release text will be taken from the annotated tag, created with "chag")
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_NAME: ${{ steps.tag.outputs.VERSION }}
with:
name: Release ${{ steps.tag.outputs.VERSION }}
body_path: RELEASE_CHANGELOG.md
tag_name: ${{ steps.tag.outputs.VERSION }}
draft: false
prerelease: false
# -m "" means: Leave the Release mesage body as it is, do not modify
- name: Add Release Assets
run: hub release edit $(find package/ -type f -name "*.mkp" -printf "-a %p ") -m "" "${GITHUB_REF#refs/*/}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Uncomment this to debug
#- name: Setup tmate session
# uses: mxschmitt/action-tmate@v3