Skip to content

lm-container-8.1.0-rt01 #374

lm-container-8.1.0-rt01

lm-container-8.1.0-rt01 #374

name: Generate and Upload Release assets
on:
release:
types: [ created ]
jobs:
build:
name: Add release chart configuration file
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get release
id: get_release
uses: bruceadams/get-release@v1.2.2
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Get chart name from release
id: get_chart
run: |
chartname=$(echo "${{ steps.get_release.outputs.tag_name }}" | grep -E "^(.*)-[0-9\.]+" -o | rev | cut -d'-' -f2- | rev)
chartversion=$(echo "${{ steps.get_release.outputs.tag_name }}" | grep -Eio "[0-9\.]+(-[^\+]+)?")
echo "::set-output name=chartname::$chartname"
echo "::set-output name=chartversion::$chartversion"
- name: check values.yaml exists
id: values_yaml_exists
uses: andstor/file-existence-action@v1
with:
files: "./charts/${{ steps.get_chart.outputs.chartname }}/values.yaml"
- name: add values.yaml to release asset
if: steps.values_yaml_exists.outputs.files_exists == 'true'
uses: shogo82148/actions-upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./charts/${{ steps.get_chart.outputs.chartname }}/values.yaml
asset_name: ${{ steps.get_chart.outputs.chartname }}-configuration.yaml
asset_content_type: text/plain
- name: check values.schema.json exists
id: values_schema_exists
uses: andstor/file-existence-action@v1
with:
files: "./charts/${{ steps.get_chart.outputs.chartname }}/values.schema.json"
- name: add values.schema.json to release asset
uses: shogo82148/actions-upload-release-asset@v1
if: steps.values_schema_exists.outputs.files_exists == 'true'
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./charts/${{ steps.get_chart.outputs.chartname }}/values.schema.json
asset_name: values.schema.json
asset_content_type: text/plain
- name: Wait for gh-pages to publish index.yaml
uses: lewagon/wait-on-check-action@v1.3.3
if: ${{ steps.get_chart.outputs.chartname == 'lm-container' }}
with:
ref: "gh-pages"
running-workflow-name: "pages-build-deployment"
repo-token: ${{ secrets.CHART_RELEASE_TOKEN }}
wait-interval: 30