v1.13.1 #97
Workflow file for this run
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
name: Release Docker Image | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
release: | |
name: Docker build and push | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
ref: master | |
- name: Get version without v character | |
id: version | |
run: | | |
VERSION=${{github.event.release.tag_name}} | |
VERSION_WITHOUT_V=${VERSION:1} | |
echo "::set-output name=value::$(echo $VERSION_WITHOUT_V)" | |
- name: Release to Docker | |
run: | | |
echo ${{secrets.DOCKER_PASSWORD}} | docker login -u ${{secrets.DOCKER_USERNAME}} --password-stdin | |
sleep 1m #docker image installs generator from npm, this sleep protects this step from any delays on npm side | |
npm run docker:build | |
docker tag asyncapi/generator:latest asyncapi/generator:${{ steps.version.outputs.value }} | |
docker push asyncapi/generator:${{ steps.version.outputs.value }} | |
docker push asyncapi/generator:latest | |