Skip to content

chore(release): 0.15.7 #20

chore(release): 0.15.7

chore(release): 0.15.7 #20

Workflow file for this run

name: Docker Image CI
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: set_var
run: |
content=`cat ./elk/package.json`
# the following lines are only required for multi line json
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
# end of optional handling for multi line json
echo "::set-output name=packageJson::$content"
- name: Build the Docker image
run: |
cd elk
docker build -t elk .
docker save -o ./elk.tar elk
zip elk.zip elk.tar
- name: Create Draft Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{fromJson(steps.set_var.outputs.packageJson).version}}
release_name: ${{fromJson(steps.set_var.outputs.packageJson).version}}
draft: true
prerelease: false
- uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./elk/elk.zip
asset_name: elk.zip
asset_content_type: application/zip
- uses: eregon/publish-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.create_release.outputs.id }}